Extra butter
This commit is contained in:
parent
19732378a2
commit
0574f8252b
4
Rakefile
4
Rakefile
|
@ -245,7 +245,7 @@ namespace :justask do
|
||||||
progress = ProgressBar.create title: 'Processing reports', format: format, starting_at: 0, total: total
|
progress = ProgressBar.create title: 'Processing reports', format: format, starting_at: 0, total: total
|
||||||
destroyed = 0
|
destroyed = 0
|
||||||
Report.all.each do |r|
|
Report.all.each do |r|
|
||||||
if r.target.nil?
|
if r.target.nil? and not r.deleted?
|
||||||
r.deleted = true
|
r.deleted = true
|
||||||
r.save
|
r.save
|
||||||
destroyed += 1
|
destroyed += 1
|
||||||
|
@ -324,7 +324,7 @@ namespace :justask do
|
||||||
total = Report.count
|
total = Report.count
|
||||||
progress = ProgressBar.create title: 'Processing reports', format: format, starting_at: 0, total: total
|
progress = ProgressBar.create title: 'Processing reports', format: format, starting_at: 0, total: total
|
||||||
Report.all.each do |r|
|
Report.all.each do |r|
|
||||||
if r.target.nil?
|
if r.target.nil? and not r.deleted?
|
||||||
r.deleted = true
|
r.deleted = true
|
||||||
r.save
|
r.save
|
||||||
destroyed_count[:report] += 1
|
destroyed_count[:report] += 1
|
||||||
|
|
Loading…
Reference in New Issue