1
0
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:
Sylvain 2020-04-28 09:45:12 +02:00
parent 570672c5db
commit 3624bee057
2 changed files with 3 additions and 0 deletions

View File

@ -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

View File

@ -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)