diff --git a/app/models/member.rb b/app/models/member.rb index 39703147d..0d0540690 100644 --- a/app/models/member.rb +++ b/app/models/member.rb @@ -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