Room availability always returns a number (even if that room is not present)

This commit is contained in:
Ed 2023-08-06 14:25:50 +02:00
parent fec10740a4
commit a963f93d52
1 changed files with 2 additions and 1 deletions

3
ext.py
View File

@ -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: