提交 2f7260b4 编写于 作者: D Douglas Barbosa Alexandre

Fix max number of permitted priorities per project label

上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册