diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/form/custom_emoji_batch.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/form/custom_emoji_batch.rb b/app/models/form/custom_emoji_batch.rb index 076e8c9e3..6b7ea5355 100644 --- a/app/models/form/custom_emoji_batch.rb +++ b/app/models/form/custom_emoji_batch.rb @@ -40,7 +40,7 @@ class Form::CustomEmojiBatch if category_id.present? CustomEmojiCategory.find(category_id) elsif category_name.present? - CustomEmojiCategory.create!(name: category_name) + CustomEmojiCategory.find_or_create_by!(name: category_name) end end |