mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
[bug] unable to create new availabilities if SLOT_DURATION is not defined
This commit is contained in:
parent
60cf79a2b4
commit
0b341af1ed
@ -4,6 +4,7 @@
|
||||
- Improved contextual help with a modal dialog
|
||||
- Updated translations
|
||||
- Refactored translations to help merging Crowdin PR
|
||||
- Fix a bug: unable to create new availabilities if SLOT_DURATION is not defined
|
||||
|
||||
## v4.3.1 2020 March 04
|
||||
|
||||
|
@ -41,7 +41,6 @@ Application.Controllers.controller('HomeController', ['$scope', '$stateParams',
|
||||
// We set the home page content, with the directives replacing the placeholders
|
||||
$scope.homeContent = insertDirectives(settingsPromise.home_content);
|
||||
|
||||
|
||||
// for admins, setup the tour on login
|
||||
$scope.$watch('currentUser', function (newValue, oldValue) {
|
||||
if (!oldValue && newValue && newValue.role === 'admin') {
|
||||
|
@ -159,9 +159,9 @@ class Availability < ActiveRecord::Base
|
||||
private
|
||||
|
||||
def length_must_be_slot_multiple
|
||||
if end_at < (start_at + Rails.application.secrets.slot_duration.minutes)
|
||||
errors.add(:end_at, I18n.t('availabilities.length_must_be_slot_multiple', MIN: Rails.application.secrets.slot_duration))
|
||||
end
|
||||
return unless end_at < (start_at + ApplicationHelper::SLOT_DURATION.minutes)
|
||||
|
||||
errors.add(:end_at, I18n.t('availabilities.length_must_be_slot_multiple', MIN: ApplicationHelper::SLOT_DURATION))
|
||||
end
|
||||
|
||||
def should_be_associated
|
||||
|
Loading…
x
Reference in New Issue
Block a user