Don't migrate categories that do not exists anymore.
This commit is contained in:
parent
1a3928b803
commit
5cfa7f913d
|
@ -44,6 +44,8 @@ module Jobs
|
||||||
row.key.to_i
|
row.key.to_i
|
||||||
end
|
end
|
||||||
|
|
||||||
|
next if !category_id.nil? && !Category.exists?(id: category_id)
|
||||||
|
|
||||||
valid_tags = []
|
valid_tags = []
|
||||||
valid_tags = Tag.where(name: rule[:tags]).pluck(:name) if rule[:tags]
|
valid_tags = Tag.where(name: rule[:tags]).pluck(:name) if rule[:tags]
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue