Fix max number of permitted priorities per project label

parent f0ad0cef
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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment