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

Update app/services/notifications/create_from_model_service/work_package_strategy.rb

Bruno Pagno924d15080e36
diff --git a/app/services/notifications/create_from_model_service/work_package_strategy.rb b/app/services/notifications/create_from_model_service/work_package_strategy.rb
index 77e5e0fdcba..5e7310fa6c1 100644
--- a/app/services/notifications/create_from_model_service/work_package_strategy.rb
+++ b/app/services/notifications/create_from_model_service/work_package_strategy.rb
@@ -32,7 +32,7 @@ module Notifications::CreateFromModelService::WorkPackageStrategy
end
def self.permission(journal, _reason)
- if journal.restricted?
+ if journal&.restricted?
# we assume that if a journal is restricted it is a comment and respects the
# view comments with restricted visibility permissions
:view_comments_with_restricted_visibility