Code clean up. Working on returning proper 404 vs 400 responses if the results are empty and nothing went wrong.

This commit is contained in:
Scott Idem
2021-12-13 18:55:31 -05:00
parent 92a44b9f41
commit 39db1999fb
27 changed files with 301 additions and 239 deletions

View File

@@ -170,7 +170,7 @@ async def get_event_obj_event_location_list(
else:
event_location_result_list.append(None)
response_data = event_location_result_list
elif event_location_rec_list_result is None:
elif isinstance(event_location_rec_list_result, list) or event_location_rec_list_result is None: # Empty list or None
log.info('No results')
return mk_resp(data=None, status_code=404, response=response) # Not Found
else: