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

[#55186] added settings attribute to project base contract

Eric Schubert81b4b6a5e865
diff --git a/app/contracts/projects/base_contract.rb b/app/contracts/projects/base_contract.rb
index 7b0ec44ca03..5da143aab54 100644
--- a/app/contracts/projects/base_contract.rb
+++ b/app/contracts/projects/base_contract.rb
@@ -35,6 +35,7 @@ module Projects
attribute :identifier
attribute :description
attribute :public
+ attribute :settings
attribute :active do
validate_active_present
validate_changing_active
@@ -81,7 +82,7 @@ module Projects
def validate_parent_assignable
if model.parent &&
model.parent_id_changed? &&
- !assignable_parents.where(id: parent.id).exists?
+ !assignable_parents.exists?(id: parent.id)
errors.add(:parent, :does_not_exist)
end
end