1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-02-20 14:54:15 +01:00

[bug] the training validation modal shows cancelled trainings

This commit is contained in:
Sylvain 2021-06-15 10:18:14 +02:00
parent 3f8ff3a0f0
commit f91ee24639
2 changed files with 3 additions and 1 deletions

View File

@ -4,6 +4,7 @@
- Do not display the type in the plans list
- Fix a bug: a message tells that creating a new plan fails, but it worked
- Fix a bug: unable to select no category in plan creation/edition after a category selection
- Fix a bug: the training validation modal shows cancelled trainings
## v5.0.3 2021 June 14

View File

@ -60,7 +60,8 @@ class API::TrainingsController < API::ApiController
@training = Training.find(params[:id])
@availabilities = @training.availabilities
.includes(slots: { reservations: { statistic_profile: [:trainings, user: [:profile]] } })
.order('start_at DESC')
.where('slots.canceled_at': nil)
.order('availabilities.start_at DESC')
end
private