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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user