1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-23 17:01:13 +00:00

Don't add the inclusion error when tracker is not set, the blank error is enough.

git-svn-id: http://svn.redmine.org/redmine/trunk@15492 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2016-06-07 18:29:17 +00:00
parent d18ef93c85
commit 90d14b71b3

View File

@ -691,7 +691,7 @@ class Issue < ActiveRecord::Base
# Checks that the issue can not be added/moved to a disabled tracker
if project && (tracker_id_changed? || project_id_changed?)
unless project.trackers.include?(tracker)
if tracker && !project.trackers.include?(tracker)
errors.add :tracker_id, :inclusion
end
end