mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
{bug] unable to create events or trainings that are not multiples of SLOT_DURATION
This commit is contained in:
parent
570672c5db
commit
3624bee057
@ -3,6 +3,7 @@
|
||||
- Interface to manage partners
|
||||
- Ability to define, per availability, a custom duration for the reservation slots
|
||||
- Fix a bug: unable to change group if the previous was deactivated
|
||||
- Fix a bug: unable to create events or trainings that are not multiples of SLOT_DURATION
|
||||
|
||||
## v4.3.4 2020 April 14
|
||||
|
||||
|
@ -160,6 +160,8 @@ class Availability < ApplicationRecord
|
||||
private
|
||||
|
||||
def length_must_be_slot_multiple
|
||||
return unless available_type == 'machines' || available_type == 'space'
|
||||
|
||||
duration = slot_duration || ApplicationHelper::SLOT_DURATION
|
||||
return unless end_at < (start_at + duration.minutes)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user