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:
Claire 2025-04-23 10:12:31 +02:00 committed by GitHub
parent dee744c793
commit 7bc301e184
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 66 additions and 37 deletions

View file

@ -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