mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-18 07:52:23 +01:00
(fix) fix all failing tasks of rake task file chain.rake
This commit is contained in:
parent
ad8d428cbd
commit
a580d731ac
@ -1,5 +1,9 @@
|
||||
# Changelog Fab-manager
|
||||
|
||||
## next release
|
||||
|
||||
- Fix a bug: fix all failing tasks of rake task file chain.rake
|
||||
|
||||
## v6.2.0 2023 October 13
|
||||
|
||||
- Fix a bug: fix ReservationReminderWorker, was sending reservation reminder to users with a event reservation not validated by admin + adds tests for all scenarios
|
||||
|
@ -19,11 +19,9 @@ namespace :fablab do
|
||||
|
||||
desc 'assign all footprints to existing Invoice records'
|
||||
task invoices: :environment do
|
||||
if Invoice.where.not(footprint: nil).count.positive?
|
||||
print 'WARNING: Footprints were already generated. Regenerate? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
end
|
||||
print 'Are you sure you want to regenerate footprints? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
chain_invoices
|
||||
end
|
||||
|
||||
@ -40,11 +38,9 @@ namespace :fablab do
|
||||
|
||||
desc 'assign all footprints to existing InvoiceItem records'
|
||||
task invoices_items: :environment do
|
||||
if InvoiceItem.where.not(footprint: nil).count.positive?
|
||||
print 'WARNING: Footprints were already generated. Regenerate? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
end
|
||||
print 'Are you sure you want to regenerate footprints? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
chain_invoice_items
|
||||
end
|
||||
|
||||
@ -61,11 +57,9 @@ namespace :fablab do
|
||||
|
||||
desc 'assign all footprints to existing HistoryValue records'
|
||||
task history_values: :environment do
|
||||
if HistoryValue.where.not(footprint: nil).count.positive?
|
||||
print 'WARNING: Footprints were already generated. Regenerate? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
end
|
||||
print 'Are you sure you want to regenerate footprints? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
chain_history_values
|
||||
end
|
||||
|
||||
@ -75,11 +69,9 @@ namespace :fablab do
|
||||
|
||||
desc 'assign all footprints to existing PaymentSchedule records'
|
||||
task payment_schedule: :environment do
|
||||
if PaymentSchedule.where.not(footprint: nil).count.positive?
|
||||
print 'WARNING: Footprints were already generated. Regenerate? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
end
|
||||
print 'Are you sure you want to regenerate footprints? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
chain_payment_schedules
|
||||
end
|
||||
|
||||
@ -96,11 +88,9 @@ namespace :fablab do
|
||||
|
||||
desc 'assign all footprints to existing PaymentScheduleItem records'
|
||||
task payment_schedule_item: :environment do
|
||||
if PaymentScheduleItem.where.not(footprint: nil).count.positive?
|
||||
print 'WARNING: Footprints were already generated. Regenerate? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
end
|
||||
print 'Are you sure you want to regenerate footprints? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
chain_payment_schedules_items
|
||||
end
|
||||
|
||||
@ -117,11 +107,9 @@ namespace :fablab do
|
||||
|
||||
desc 'assign all footprints to existing PaymentScheduleObject records'
|
||||
task payment_schedule_object: :environment do
|
||||
if PaymentScheduleObject.where.not(footprint: nil).count.positive?
|
||||
print 'WARNING: Footprints were already generated. Regenerate? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
end
|
||||
print 'Are you sure you want to regenerate footprints? (y/n) '
|
||||
confirm = $stdin.gets.chomp
|
||||
next unless confirm == 'y'
|
||||
chain_payment_schedules_objects
|
||||
end
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user