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

(Bug) Fix reservations count from spaces in availabilities export

This commit is contained in:
Guilherme Chaguri 2022-11-29 18:18:47 -03:00
parent 2a4d50e7d9
commit be4ea06fdf

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,