modification de la route de récuperation des horaires de la bdd

This commit is contained in:
Vincent BENOIT
2022-10-18 17:36:30 +02:00
parent eded87131e
commit 70f9c53cd9
2 changed files with 1034 additions and 363 deletions

1389
db.json

File diff suppressed because it is too large Load Diff

View File

@@ -76,7 +76,13 @@ def retreive_scheduler():
content = []
if 'HORAIRES' in data:
for day in data['HORAIRES']:
content.append({'name':day, 'horaires':data['HORAIRES'][day]})
h = []
for hour in data['HORAIRES'][day]:
h.append(hour)
#for k,v in hour.items():
# current_app.logger.debug("k:{}, v:{}".format(k,v))
# h.append({'name': k, 'state':v})
content.append({'name': day, 'horaires':h})
current_app.logger.debug("{}".format(content))
else:
abort(status.HTTP_406_NOT_ACCEPTABLE, description="horaire manquant en base de données")