summaryrefslogtreecommitdiff
path: root/app/models/label.rb
diff options
context:
space:
mode:
authorMartin Hanzel <mhanzel@gitlab.com>2019-07-25 12:59:37 +0200
committerMartin Hanzel <mhanzel@gitlab.com>2019-07-25 12:59:37 +0200
commit8201593066c5b932d7f998da5c07ea91e25a15cc (patch)
tree0204ab6ff6f506ff43c95855605dc056d68d8b2a /app/models/label.rb
parent979f0842653fa6b48a88cb6286a2145654d8e197 (diff)
parent0ec40a68b73cbf14b34e55ee2a54df1f47c19cfb (diff)
downloadgitlab-ce-8201593066c5b932d7f998da5c07ea91e25a15cc.tar.gz
Merge commit '0ec40a68b73cbf14b34e55ee2a54df1f47c19cfb' into mh/editor-indentsmh/editor-indents-reviewmh/editor-indents
Diffstat (limited to 'app/models/label.rb')
-rw-r--r--app/models/label.rb2
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 }) }