summaryrefslogtreecommitdiff
path: root/app/models
diff options
context:
space:
mode:
authorHeinrich Lee Yu <heinrich@gitlab.com>2019-08-13 00:40:39 +0000
committerMayra Cabrera <mcabrera@gitlab.com>2019-08-13 00:40:39 +0000
commit7a6ecbcb18e691d88d22b400973ebeb81390e9fd (patch)
treecea76ff8126c7d3e2917af3b5a00389a1211034d /app/models
parent2de17d12d6d8daf1296526ca0b594cf61f808339 (diff)
downloadgitlab-ce-7a6ecbcb18e691d88d22b400973ebeb81390e9fd.tar.gz
Improve quick action error messages
Standardize punctuation and format
Diffstat (limited to 'app/models')
-rw-r--r--app/models/label.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/app/models/label.rb b/app/models/label.rb
index 25de26b8384..d9455b36242 100644
--- a/app/models/label.rb
+++ b/app/models/label.rb
@@ -138,6 +138,8 @@ class Label < ApplicationRecord
end
def self.on_project_board?(project_id, label_id)
+ return false if label_id.blank?
+
on_project_boards(project_id).where(id: label_id).exists?
end