summaryrefslogtreecommitdiff
path: root/app/models/award_emoji.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/award_emoji.rb')
-rw-r--r--app/models/award_emoji.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/award_emoji.rb b/app/models/award_emoji.rb
index 5a33a8f89df..5ba6100f169 100644
--- a/app/models/award_emoji.rb
+++ b/app/models/award_emoji.rb
@@ -15,7 +15,7 @@ class AwardEmoji < ApplicationRecord
validates :awardable, presence: true, unless: :importing?
validates :name, presence: true, inclusion: { in: Gitlab::Emoji.emojis_names }
- validates :name, uniqueness: { scope: [:user, :awardable_type, :awardable_id] }, unless: :ghost_user?
+ validates :name, uniqueness: { scope: [:user, :awardable_type, :awardable_id] }, unless: -> { ghost_user? || importing? }
participant :user