summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-07 18:29:17 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-06-07 18:29:17 +0000
commit90d14b71b3656a8362d7508dd88b2aea43c6fa31 (patch)
tree45750b5ce85ac10b125f4d851442d11ce2dc0fe2 /app
parentd18ef93c85518dd76d3d8ecd6a99c1c5036a7fb0 (diff)
downloadredmine-90d14b71b3656a8362d7508dd88b2aea43c6fa31.tar.gz
redmine-90d14b71b3656a8362d7508dd88b2aea43c6fa31.zip
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
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index e0b99e4e6..98e348d6a 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -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