diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 15:10:10 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-15 15:10:10 +0300 |
commit | 1a129420d6bd3e5223e8ba4a5b7749764118a885 (patch) | |
tree | 010a9f12e7691e11c473ffc3313ffc245b75b1ec /app/models/work_items | |
parent | 9bd7e5997e1452257e3861555c151764cf0574d7 (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.rb | 3 |
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 |