mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-27 10:47:55 -05:00
Merge pull request #297 from Skud/cropbot-over-enthusiasm
reined in over-enthusiastic rake task
This commit is contained in:
@@ -138,12 +138,16 @@ namespace :growstuff do
|
||||
cropbot.account.account_type = AccountType.find_by_name("Staff") # set this just because it's nice
|
||||
cropbot.account.save
|
||||
Crop.find_each do |crop|
|
||||
crop.creator = cropbot
|
||||
crop.save
|
||||
unless crop.creator
|
||||
crop.creator = cropbot
|
||||
crop.save
|
||||
end
|
||||
end
|
||||
ScientificName.find_each do |sn|
|
||||
sn.creator = cropbot
|
||||
sn.save
|
||||
unless sn.creator
|
||||
sn.creator = cropbot
|
||||
sn.save
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
# when it was added. This will help us know which ones have been run
|
||||
# and can safely be commented out or removed.
|
||||
|
||||
echo "2013-08-18 - reset crop planting counts"
|
||||
rake growstuff:oneoff:reset_crop_plantings_count
|
||||
|
||||
echo "2013-08-21 - set default crop creator"
|
||||
rake growstuff:oneoff:set_default_crop_creator
|
||||
# Default format is:
|
||||
# echo "YYYY-MM-DD - do something or other"
|
||||
# rake growstuff:oneoff:something
|
||||
|
||||
Reference in New Issue
Block a user