pwa: fix test for 410 Gone webpush error (#49013)
This commit is contained in:
parent
083178f0f6
commit
794beda7a1
|
@ -59,7 +59,7 @@ def notification(sender, instance=None, created=False, **kwargs):
|
|||
vapid_claims=claims,
|
||||
)
|
||||
except pywebpush.WebPushException as e:
|
||||
if str(e) == 'Push failed: 410 Gone':
|
||||
if 'Push failed: 410 Gone' in str(e):
|
||||
subscription.delete()
|
||||
continue
|
||||
logger = logging.getLogger(__name__)
|
||||
|
|
Loading…
Reference in New Issue