1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-29 18:52:22 +01:00

prevent notification crash on nil reservation

This commit is contained in:
Sylvain 2021-03-29 10:19:37 +02:00
parent 818e9e99fc
commit e38228ae7e

View File

@ -1,5 +1,7 @@
# frozen_string_literal: true
json.title notification.notification_type
json.description t('.your_reservation_RESERVABLE_of_DATE_was_successfully_cancelled',
RESERVABLE: notification.attached_object.reservation.reservable.name,
RESERVABLE: notification.attached_object.reservation&.reservable&.name,
DATE: I18n.l(notification.attached_object.start_at, format: :long))