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

@@ -661,10 +661,11 @@ def sql_select(
return record_li # Successful
else:
if as_list:
log.info('No records found. Returning as empty list.')
# log.info('No records found. Returning None since the list is an empty list.')
log.info('No records found. Returning an empty list.')
log.debug(result)
return None # Successful
return [] # Successful
else:
log.info('No records found. Returning None.')
log.debug(result)