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

[bug] a reminder notification were sent for canceled reservations

This commit is contained in:
Sylvain 2018-01-09 14:39:52 +01:00
parent f622789e5d
commit bdf799f79e
3 changed files with 6 additions and 2 deletions

View File

@ -1 +1 @@
2.6.3
2.6.4-dev

View File

@ -1,5 +1,9 @@
# Changelog Fab Manager
## next release
- Fix a bug: a reminder notification were sent for canceled reservations
## v2.6.3 2018 January 2
- Fix a bug: wrong docker-compose url in setup script (#98)

View File

@ -12,7 +12,7 @@ class ReservationReminderWorker
starting = Time.now.beginning_of_hour + delay
ending = starting + 1.hour
Reservation.joins(:slots).where('slots.start_at >= ? AND slots.start_at <= ?', starting, ending).each do |r|
Reservation.joins(:slots).where('slots.start_at >= ? AND slots.start_at <= ? AND slots.canceled_at IS NULL', starting, ending).each do |r|
already_sent = Notification.where(
attached_object_type: Reservation.name,
attached_object_id: r.id,