From a963f93d524f09046fa3c259ccc610a89dd043e0 Mon Sep 17 00:00:00 2001 From: Ed Date: Sun, 6 Aug 2023 14:25:50 +0200 Subject: [PATCH] Room availability always returns a number (even if that room is not present) --- ext.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ext.py b/ext.py index 2b4a345..9f87c21 100644 --- a/ext.py +++ b/ext.py @@ -177,7 +177,8 @@ class Quotas: def get_left(self, capacity): for quota in self.data['results']: if quota['id'] == ROOM_MAP[capacity]: - return quota['available_number'] + return quota['available_number'] + return 0 async def get_quotas(request: Request=None): async with httpx.AsyncClient() as client: