Compare commits

..

2 Commits

Author SHA1 Message Date
Ed a963f93d52 Room availability always returns a number (even if that room is not present) 2023-08-06 14:25:50 +02:00
Ed fec10740a4 Added missing requirements 2023-08-06 13:41:10 +02:00
2 changed files with 3 additions and 1 deletions

1
ext.py
View File

@ -178,6 +178,7 @@ class Quotas:
for quota in self.data['results']: for quota in self.data['results']:
if quota['id'] == ROOM_MAP[capacity]: if quota['id'] == ROOM_MAP[capacity]:
return quota['available_number'] return quota['available_number']
return 0
async def get_quotas(request: Request=None): async def get_quotas(request: Request=None):
async with httpx.AsyncClient() as client: async with httpx.AsyncClient() as client:

View File

@ -3,3 +3,4 @@ sanic-ext
httpx httpx
Pillow Pillow
aztec_code_generator aztec_code_generator
jinja2