pwa: don't crash if X.962 serialization is not available (#35954)
This commit is contained in:
parent
5cce8d3490
commit
b8eb8ee54a
|
@ -47,7 +47,7 @@ def js_response(request, template_name, **kwargs):
|
|||
template = get_template(template_name)
|
||||
pwa_vapid_public_key = None
|
||||
pwa_settings = PwaSettings.singleton()
|
||||
if pwa_settings.push_notifications:
|
||||
if pwa_settings.push_notifications and hasattr(serialization.Encoding, 'X962'):
|
||||
if settings.PWA_VAPID_PUBLIK_KEY: # legacy
|
||||
pwa_vapid_public_key = settings.PWA_VAPID_PUBLIK_KEY
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue