summaryrefslogtreecommitdiffstats
path: root/app/models/issue.rb
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-08 12:26:57 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2012-01-08 12:26:57 +0000
commit906fcd290cac90d32da1c4be4aeee88adfaab5c5 (patch)
treefaed908e55adb44f86a3aa5b8b990307bcd31ad6 /app/models/issue.rb
parent2a55d37619719cff870f02a9c771963269b45a93 (diff)
downloadredmine-906fcd290cac90d32da1c4be4aeee88adfaab5c5.tar.gz
redmine-906fcd290cac90d32da1c4be4aeee88adfaab5c5.zip
Initialize watcher_user_ids for new records to prevent useless queries on each #watched_by?.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@8554 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r--app/models/issue.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb
index 007339130..abd2d210a 100644
--- a/app/models/issue.rb
+++ b/app/models/issue.rb
@@ -119,6 +119,7 @@ class Issue < ActiveRecord::Base
# set default values for new records only
self.status ||= IssueStatus.default
self.priority ||= IssuePriority.default
+ self.watcher_user_ids = []
end
end