Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fix unwatch_from_permission_change when project nil

Oliver Günther70bc14625d60
diff --git a/app/models/member.rb b/app/models/member.rb
index 8ca16018da3..2b4d82700bc 100644
--- a/app/models/member.rb
+++ b/app/models/member.rb
@@ -241,7 +241,7 @@ class Member < ActiveRecord::Base
# Accordingly it has to be changed there too should this bit change at all.
def unwatch_from_permission_change
if principal
- Watcher.prune(user: principal, project_id: project.id)
+ Watcher.prune(user: principal, project_id: project_id)
end
end