Skip to content
Snippets Groups Projects
Commit b731731f authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Fix #1386

parent e89cd460
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,8 @@ class Communication::Website::Agenda::Event < ApplicationRecord
validates_presence_of :from_day, :title
validate :to_day_after_from_day, :to_hour_after_from_hour_on_same_day
before_validation :set_to_day
STATUS_FUTURE = 'future'
STATUS_CURRENT = 'current'
STATUS_ARCHIVE = 'archive'
......@@ -218,4 +220,8 @@ class Communication::Website::Agenda::Event < ApplicationRecord
def abouts_with_agenda_block
website.blocks.agenda.collect(&:about)
end
def set_to_day
self.to_day = self.from_day if self.to_day.nil?
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment