Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-07-15 15:10:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-07-15 15:10:10 +0300
commit1a129420d6bd3e5223e8ba4a5b7749764118a885 (patch)
tree010a9f12e7691e11c473ffc3313ffc245b75b1ec /app/models/work_items
parent9bd7e5997e1452257e3861555c151764cf0574d7 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/work_items')
-rw-r--r--app/models/work_items/parent_link.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/models/work_items/parent_link.rb b/app/models/work_items/parent_link.rb
index fc907f323e4..f5ebbfa59b8 100644
--- a/app/models/work_items/parent_link.rb
+++ b/app/models/work_items/parent_link.rb
@@ -10,7 +10,8 @@ module WorkItems
belongs_to :work_item
belongs_to :work_item_parent, class_name: 'WorkItem'
- validates :work_item, :work_item_parent, presence: true
+ validates :work_item_parent, presence: true
+ validates :work_item, presence: true, uniqueness: true
validate :validate_child_type
validate :validate_parent_type
validate :validate_same_project