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

adapt validation context override

ulferts0213489f29e4
diff --git a/app/models/project.rb b/app/models/project.rb
index 6703dfa9c37..cd4bf2b4a0e 100644
--- a/app/models/project.rb
+++ b/app/models/project.rb
@@ -117,11 +117,11 @@ class Project < ApplicationRecord
# This problem does not affect the contextless callbacks, they are always executed.
def validation_context
- case Array(@validation_context)
+ case Array(super)
in [*, :saving_custom_fields, *] => context
context << default_validation_context
else
- @validation_context
+ super
end
end