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 failing specs through adjusted before_validation hook

Jonas Jabari6417f0d7a7ca
diff --git a/modules/meeting/app/models/meeting_agenda_item.rb b/modules/meeting/app/models/meeting_agenda_item.rb
index a6d83eb6934..cd52da17a98 100644
--- a/modules/meeting/app/models/meeting_agenda_item.rb
+++ b/modules/meeting/app/models/meeting_agenda_item.rb
@@ -78,10 +78,10 @@ class MeetingAgendaItem < ApplicationRecord
meeting_section = meeting.sections.order(position: :asc).last
if meeting_section.nil?
- meeting_section = meeting.sections.create!(title: "Untitled")
+ meeting_section = meeting.sections.build(title: "Untitled")
end
- self.meeting_section_id = meeting_section.id
+ self.meeting_section = meeting_section
end
end