mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-01-30 20:20:59 -05:00
Make load altnames task idempotent.
This commit is contained in:
@@ -283,8 +283,7 @@ namespace :growstuff do
|
||||
next
|
||||
end
|
||||
alternate_names.split(/,\s*/).each do |an|
|
||||
puts "Adding alternate name '#{an}' to #{crop}"
|
||||
AlternateName.create(
|
||||
AlternateName.find_or_create(
|
||||
name: an,
|
||||
crop_id: crop_id,
|
||||
creator_id: cropbot.id
|
||||
|
||||
Reference in New Issue
Block a user