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

@@ -365,9 +365,11 @@ def get_order_rec_list(
"""
log.debug(sql)
if order_rec_li_result := sql_select(data=data, sql=sql):
if order_rec_li_result := sql_select(data=data, sql=sql, as_list=True):
log.info('Got a list result')
order_rec_li = order_rec_li_result
else: # None or False
else: # [] or False
log.info('No results or something went wrong')
order_rec_li = order_rec_li_result
log.debug(order_rec_li_result)