Extra butter

This commit is contained in:
Yuki 2015-04-28 14:23:06 +05:30
parent 19732378a2
commit 0574f8252b
1 changed files with 2 additions and 2 deletions

View File

@ -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