From 7a6ecbcb18e691d88d22b400973ebeb81390e9fd Mon Sep 17 00:00:00 2001 From: Heinrich Lee Yu Date: Tue, 13 Aug 2019 00:40:39 +0000 Subject: Improve quick action error messages Standardize punctuation and format --- app/models/label.rb | 2 ++ 1 file changed, 2 insertions(+) (limited to 'app/models') 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 -- cgit v1.2.1