pwa: fix test for 410 Gone webpush error (#49013)

This commit is contained in:
Frédéric Péters 2020-12-01 14:23:03 +01:00
parent 083178f0f6
commit 794beda7a1
1 changed files with 1 additions and 1 deletions

View File

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