mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
fix training reservation calendar witch shows all trainings slots
This commit is contained in:
parent
852437ebf8
commit
b75cbc17d7
@ -6,6 +6,7 @@
|
||||
- Fix a bug: misconfigured Twitter's ENV variables results in HTTP error 500
|
||||
- Fix a bug: wallet is not debited when paying locally with a user who have invoices disabled
|
||||
- Fix a bug: wrong error message about rounding inconsistency is logged on invoice generation
|
||||
- Fix a bug: reservation calendar of a specific training shows availabilities for all trainings
|
||||
|
||||
## v2.4.4 2016 November 24
|
||||
|
||||
|
@ -126,8 +126,8 @@ class API::AvailabilitiesController < API::ApiController
|
||||
|
||||
# what is requested?
|
||||
# 1) a single training
|
||||
if params[:training_id].is_number?
|
||||
@availabilities = Training.find(params[:training_id]).availabilities
|
||||
if params[:training_id].is_number? or (params[:training_id].length > 0 and params[:training_id] != 'all')
|
||||
@availabilities = Training.friendly.find(params[:training_id]).availabilities
|
||||
# 2) all trainings
|
||||
else
|
||||
@availabilities = Availability.trainings
|
||||
|
Loading…
x
Reference in New Issue
Block a user