]> source.dussan.org Git - redmine.git/commitdiff
Fixed: error when removing a project member (postgresql and sqlite only).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Jan 2008 13:53:45 +0000 (13:53 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 20 Jan 2008 13:53:45 +0000 (13:53 +0000)
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1082 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/member.rb

index 39703147d2bf8f53434fafc6c26339e555bff661..0d0540690b5095743c844d242111d923d6126451 100644 (file)
@@ -33,6 +33,6 @@ class Member < ActiveRecord::Base
   
   def before_destroy
     # remove category based auto assignments for this member
-    project.issue_categories.update_all "assigned_to_id = NULL", ["assigned_to_id = ?", self.user.id]
+    IssueCategory.update_all "assigned_to_id = NULL", ["project_id = ? AND assigned_to_id = ?", project.id, user.id]
   end
 end