diff options
author | Robert Speicher <rspeicher@gmail.com> | 2019-07-24 19:42:06 +0000 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2019-07-24 19:42:06 +0000 |
commit | b70dbabb6373e7624e3bcb7a6d78049621db891c (patch) | |
tree | 61158d467cd3a92bc7e94010936c348de9aa724c /app/models | |
parent | 50ab880f804e39abee3e5bea49ddab13b37f72d7 (diff) | |
parent | 13e7feef08a4b4fd32d553ac58f943a1f8a3d579 (diff) | |
download | gitlab-ce-b70dbabb6373e7624e3bcb7a6d78049621db891c.tar.gz |
Merge branch '63730-fix-500-status-labels-pd' into 'master'
Add where condition to filter out labels with type here
Closes #63730
See merge request gitlab-org/gitlab-ce!30885
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/label.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/label.rb b/app/models/label.rb index b83e0862bab..dd403562bfa 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -33,7 +33,7 @@ class Label < ApplicationRecord default_scope { order(title: :asc) } - scope :templates, -> { where(template: true) } + scope :templates, -> { where(template: true, type: [Label.name, nil]) } scope :with_title, ->(title) { where(title: title) } scope :with_lists_and_board, -> { joins(lists: :board).merge(List.movable) } scope :on_project_boards, ->(project_id) { with_lists_and_board.where(boards: { project_id: project_id }) } |