1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-17 06:52:27 +01:00

[bug] public calendar won't show anything if the current date range include a reserved space availability (#151)

This commit is contained in:
Sylvain 2019-10-14 10:38:13 +02:00
parent 2d07fa9e0f
commit bc36b78719
2 changed files with 2 additions and 1 deletions

View File

@ -16,6 +16,7 @@
- Fix a bug: unable to dissociate the last machine from a formation
- Fix a bug: in profile_complete form, the user's group is not selected by default
- Fix a bug: missing asterisks on some required fields in profile_complete form
- Fix a bug: public calendar won't show anything if the current date range include a reserved space availability (#151)
- Fix a security issue: fixed [CVE-2015-9284](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2015-9284)
- [TODO DEPLOY] **IMPORTANT** Please read [postgres_upgrade.md](doc/postgres_upgrade.md) for instructions on upgrading PostgreSQL.
- [TODO DEPLOY] `rake db:migrate`

View File

@ -82,7 +82,7 @@ class Availabilities::StatusService
availability.slots.each do |s|
reserved_slots << s if s.canceled_at.nil?
end
reserved_slots.map(&:reservations).flatten.map(&:user_id).include? user.id
reserved_slots.map(&:reservations).flatten.map(&:statistic_profile_id).include? user.statistic_profile&.id
else
false
end