diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-12 15:10:24 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-12 15:10:24 +0300 |
commit | 71a67d17b02e7b8dec2f4c257f6734dc7818fb1e (patch) | |
tree | 6b45633257869a67fd534bd2cf899b93a48794c0 /app/models/label_link.rb | |
parent | 133ec9237af290062aae70e6f115db69b51c88de (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/label_link.rb')
-rw-r--r-- | app/models/label_link.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/label_link.rb b/app/models/label_link.rb index 5ae1e88e14e..4fb5fd8c58a 100644 --- a/app/models/label_link.rb +++ b/app/models/label_link.rb @@ -9,4 +9,6 @@ class LabelLink < ApplicationRecord validates :target, presence: true, unless: :importing? validates :label, presence: true, unless: :importing? + + scope :for_target, -> (target_id, target_type) { where(target_id: target_id, target_type: target_type) } end |