1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-30 19:52:20 +01:00

updates rake task fablab:chain:all

This commit is contained in:
Nicolas Florentin 2023-09-29 14:33:50 +02:00
parent 64620a2759
commit 5cfafaaa46

View File

@ -4,7 +4,7 @@ namespace :fablab do
namespace :chain do
desc 'assign all footprints to existing records'
task :all, [:force] => :environment do |_task, args|
if Invoice.where.not(footprint: nil).count.positive? && args.force != 'force'
if args.force != 'force'
print 'All footprints will be regenerated. Are you sure? (y/n) '
confirm = $stdin.gets.chomp
next unless confirm == 'y'