mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Extract checking if event is replacement to event_schedule model
This commit is contained in:
parent
9c7591adcd
commit
5111d9e937
4 changed files with 9 additions and 5 deletions
|
|
@ -31,6 +31,10 @@ class EventSchedule < ActiveRecord::Base
|
|||
room.event_schedules.where(start_time: start_time, schedule: schedule).where.not(id: id)
|
||||
end
|
||||
|
||||
def replacement?
|
||||
event.state == 'confirmed' && (!intersecting_events.canceled.empty? || !intersecting_events.withdrawn.empty?)
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def conference_id
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue