summaryrefslogtreecommitdiff
path: root/app/models/merge_request_assignee.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 00:08:58 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-01-29 00:08:58 +0000
commit79216161b305b8d23b34226d45aa92dbae316cfe (patch)
treefbedafc415fcfb9970968ac17e94a443ce7ce477 /app/models/merge_request_assignee.rb
parentc1924b863ad66503edbaa3325949bce6b023b737 (diff)
downloadgitlab-ce-79216161b305b8d23b34226d45aa92dbae316cfe.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/merge_request_assignee.rb')
-rw-r--r--app/models/merge_request_assignee.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/merge_request_assignee.rb b/app/models/merge_request_assignee.rb
index f0e6be51b7f..fe642bee8e2 100644
--- a/app/models/merge_request_assignee.rb
+++ b/app/models/merge_request_assignee.rb
@@ -3,4 +3,6 @@
class MergeRequestAssignee < ApplicationRecord
belongs_to :merge_request
belongs_to :assignee, class_name: "User", foreign_key: :user_id
+
+ validates :assignee, uniqueness: { scope: :merge_request_id }
end