Make Web::PushSubscription#user
and Web::PushSubscription#access_token
relationships non-optional (#34498)
Co-authored-by: Emelia Smith <ThisIsMissEm@users.noreply.github.com>
This commit is contained in:
parent
dee744c793
commit
7bc301e184
9 changed files with 66 additions and 37 deletions
|
@ -13,7 +13,7 @@ class Web::NotificationSerializer < ActiveModel::Serializer
|
|||
end
|
||||
|
||||
def preferred_locale
|
||||
current_push_subscription.associated_user&.locale || I18n.default_locale
|
||||
current_push_subscription.user&.locale || I18n.default_locale
|
||||
end
|
||||
|
||||
def notification_id
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue