diff options
Diffstat (limited to 'app/models/label.rb')
-rw-r--r-- | app/models/label.rb | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/app/models/label.rb b/app/models/label.rb index f43bebbf71b..be0c20479d5 100644 --- a/app/models/label.rb +++ b/app/models/label.rb @@ -26,10 +26,8 @@ class Label < ActiveRecord::Base validates :project, presence: true, if: :project_label? # Don't allow ',' for label titles - validates :title, - presence: true, - format: { with: /\A[^,]+\z/ }, - uniqueness: { scope: :project_id } + validates :title, presence: true, format: { with: /\A[^,]+\z/ } + validates :title, uniqueness: true, unless: :template? before_save :nullify_priority |