From 31e0e46417ce84876239c928e8058673e878429b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Fri, 29 Nov 2024 14:44:16 +0100 Subject: [PATCH] Move update_start_time to concern --- modules/meeting/app/models/meeting/virtual_start_time.rb | 1 + modules/meeting/app/models/recurring_meeting.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/meeting/app/models/meeting/virtual_start_time.rb b/modules/meeting/app/models/meeting/virtual_start_time.rb index cebfab7fde4a..1dbb0ca1efe5 100644 --- a/modules/meeting/app/models/meeting/virtual_start_time.rb +++ b/modules/meeting/app/models/meeting/virtual_start_time.rb @@ -43,6 +43,7 @@ module Meeting::VirtualStartTime validate :validate_date_and_time after_initialize :set_initial_values + before_save :update_start_time! end ## diff --git a/modules/meeting/app/models/recurring_meeting.rb b/modules/meeting/app/models/recurring_meeting.rb index dad1c47d3b9c..9f0732124547 100644 --- a/modules/meeting/app/models/recurring_meeting.rb +++ b/modules/meeting/app/models/recurring_meeting.rb @@ -5,7 +5,7 @@ class RecurringMeeting < ApplicationRecord belongs_to :project belongs_to :author, class_name: "User" - before_save :update_start_time! + validates_presence_of :start_time, :title, :frequency, :end_after validates_presence_of :end_date, if: -> { end_after_specific_date? }