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

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:

View File

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