summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-22 10:56:59 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2014-11-22 10:56:59 +0000
commit827ab38725d712a9bc2df875e203057713069dd8 (patch)
tree5af3e2c1f29e28db249b49204b012a5826427386 /app
parent4e69edb5b82f22759c5226ae8c9f402e61d7e1e7 (diff)
downloadredmine-827ab38725d712a9bc2df875e203057713069dd8.tar.gz
redmine-827ab38725d712a9bc2df875e203057713069dd8.zip
Selected projects in email notifications on "my account" are lost when the page is redisplayed after a validation error (#18060).
Patch by Felix Schäfer. git-svn-id: http://svn.redmine.org/redmine/trunk@13638 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/user.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/user.rb b/app/models/user.rb
index b5bb6ae1e..76e9beac6 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -368,7 +368,7 @@ class User < Principal
def notified_project_ids=(ids)
@notified_projects_ids_changed = true
- @notified_projects_ids = ids
+ @notified_projects_ids = ids.map(&:to_i).uniq.select {|n| n > 0}
end
# Updates per project notifications (after_save callback)