mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-19 13:54:25 +01:00
[bug] ReservationReminderWorker crash with undefined method find_by
This commit is contained in:
parent
c479502dd0
commit
fedfc866a9
@ -4,6 +4,7 @@
|
||||
|
||||
- Optimized notifications system
|
||||
- Fix a bug: when many users with too many unread notifications are connected at the same time, the system kill the application due to memory overflow
|
||||
- Fix a bug: ReservationReminderWorker crash with undefined method find_by
|
||||
|
||||
## v2.4.9 2017 January 4
|
||||
|
||||
|
@ -16,7 +16,7 @@ class ReservationReminderWorker
|
||||
already_sent = Notification.where(
|
||||
attached_object_type: Reservation.name,
|
||||
attached_object_id: r.id,
|
||||
notification_type_id: NotificationType.find_by(name: 'notify_member_reservation_reminder')
|
||||
notification_type_id: NotificationType.find_by_name('notify_member_reservation_reminder')
|
||||
).count
|
||||
unless already_sent > 0
|
||||
NotificationCenter.call type: 'notify_member_reservation_reminder',
|
||||
|
Loading…
x
Reference in New Issue
Block a user