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