summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2018-06-23 05:13:29 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2018-06-23 05:13:29 +0000
commitce1c65225037622c10568b3e6955cecce7e80fd9 (patch)
tree86e19714cda5281053cb496b610564dde3841c45 /app
parent157a291b6691dc5d694c84db0548b93b8561ab74 (diff)
downloadredmine-ce1c65225037622c10568b3e6955cecce7e80fd9.tar.gz
redmine-ce1c65225037622c10568b3e6955cecce7e80fd9.zip
Upgrade to Rails 5.2.0 (#23630).
git-svn-id: http://svn.redmine.org/redmine/trunk@17410 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/issue.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 91f53c19e..114d96208 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -1016,8 +1016,7 @@ class Issue < ActiveRecord::Base
# Returns the previous assignee whenever we're before the save
# or in after_* callbacks
def previous_assignee
- # This is how ActiveRecord::AttributeMethods::Dirty checks if we're in a after_* callback
- if previous_assigned_to_id = mutation_tracker.equal?(mutations_from_database) ? assigned_to_id_in_database : assigned_to_id_before_last_save
+ if previous_assigned_to_id = assigned_to_id_change_to_be_saved.nil? ? assigned_to_id_before_last_save : assigned_to_id_in_database
Principal.find_by_id(previous_assigned_to_id)
end
end