Protect against no notifications received

This commit is contained in:
Ori Kotek 2023-07-06 19:22:55 +03:00
parent 2de83827b6
commit ffa4ce3f1e
No known key found for this signature in database
GPG key ID: 5AAFD0757D1EAC4C

View file

@ -55,6 +55,8 @@ async def polling_loop():
last_modified[0] = response.headers['Last-Modified']
since[0] = None
notifications = await response.json()
if not notifications:
continue
for notification in notifications:
if 'id' in notification and notification['id'] in handled_ids:
continue