Protect against no notifications received

This commit is contained in:
Ori Kotek
2023-07-06 19:22:55 +03:00
parent 2de83827b6
commit ffa4ce3f1e

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