diff options
author | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-18 09:46:11 -0200 |
---|---|---|
committer | Douglas Barbosa Alexandre <dbalexandre@gmail.com> | 2016-10-19 14:58:28 -0200 |
commit | 2f7260b460f2a893241039115a201c2522fb47ca (patch) | |
tree | a2f5414a5ffe3e62badce5727abcbf80008ba36e /app/models | |
parent | f0ad0ceff5236f3ee5babee47bfec217a54c3b07 (diff) | |
download | gitlab-ce-2f7260b460f2a893241039115a201c2522fb47ca.tar.gz |
Fix max number of permitted priorities per project label
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project_label.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/project_label.rb b/app/models/project_label.rb index 0a79521ed09..33c2b617715 100644 --- a/app/models/project_label.rb +++ b/app/models/project_label.rb @@ -1,5 +1,5 @@ class ProjectLabel < Label - NUMBER_OF_PRIORITIES = 1 + MAX_NUMBER_OF_PRIORITIES = 1 belongs_to :project @@ -27,7 +27,7 @@ class ProjectLabel < Label end def permitted_numbers_of_priorities - if priorities && priorities.size >= NUMBER_OF_PRIORITIES + if priorities && priorities.size > MAX_NUMBER_OF_PRIORITIES errors.add(:priorities, 'Number of permitted priorities exceeded') end end |