Skip to content

Commit 8f6d3ef

Browse files
committed
Try to make language updates more robust
1 parent c19eeaf commit 8f6d3ef

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/models/actor.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def update_post_languages!
6969
LanguageTaggableConcern.expand(l)
7070
end
7171
languages.uniq!
72-
languages.each { |l| actor_languages.create!(language: l) }
72+
languages.each { |l| actor_languages.create_or_find_by!(language: l) }
7373
end
7474
end
7575

0 commit comments

Comments
 (0)