modification de la route de récuperation des horaires de la bdd
This commit is contained in:
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user