1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-01 12:24:28 +01:00

(bug) space reservations count in availabilities export (#415)

This commit is contained in:
Sylvain 2022-12-14 13:33:49 +01:00
commit 2cc1988e8d
2 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,7 @@
# Changelog Fab-manager
- Fix a bug: wrong reservations count for spaces in availabilities export (#415)
## v5.5.7 2022 December 13
- Fix a bug: unable to update/delete a space

View File

@ -88,7 +88,7 @@ if Setting.get('spaces_module')
((a.end_at - a.start_at) / slot_duration.minutes).to_i.times do |i|
start_at = a.start_at + (i * slot_duration).minutes
end_at = a.start_at + (i * slot_duration).minutes + slot_duration.minutes
reservations = a.slots.where(start_at: start_at).count
reservations = a.slots_reservations.where(slots: { start_at: start_at }).count
data = [
start_at.to_date,