Filter out invalid tags when migrating.
This commit is contained in:
parent
435b1cc9b5
commit
b33fb671f2
|
@ -43,11 +43,14 @@ module Jobs
|
|||
row.key.to_i
|
||||
end
|
||||
|
||||
valid_tags = []
|
||||
valid_tags = Tag.where(name: rule[:tags]).pluck(:name) if rule[:tags]
|
||||
|
||||
rows << {
|
||||
category_id: category_id,
|
||||
channel: rule[:channel],
|
||||
filter: rule[:filter],
|
||||
tags: rule[:tags]
|
||||
tags: valid_tags
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue