mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2024-11-29 10:24:20 +01:00
(bug) create slots when occurences is nil
This commit is contained in:
parent
6a8c441e85
commit
e955ecc6f8
@ -2,7 +2,9 @@
|
||||
|
||||
# Provides an helper method to create the slots for an Availability and optionnaly, for its multiple occurrences
|
||||
class Availabilities::CreateAvailabilitiesService
|
||||
def create(availability, occurrences = [])
|
||||
def create(availability, occurrences)
|
||||
occurrences = [] if occurrences.nil?
|
||||
|
||||
availability.update_attributes(occurrence_id: availability.id)
|
||||
create_slots(availability)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user