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:
@@ -115,12 +115,13 @@ def get_archive_rec_list(
|
||||
ORDER BY `tbl`.created_on DESC, `tbl`.updated_on DESC
|
||||
{sql_limit};
|
||||
"""
|
||||
log.debug(sql)
|
||||
|
||||
if archive_rec_li_result := sql_select(data=data, sql=sql, as_list=True):
|
||||
archive_rec_li = archive_rec_li_result
|
||||
else:
|
||||
archive_rec_li = []
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
else: # [] or False
|
||||
archive_rec_li = archive_rec_li_result
|
||||
|
||||
log.debug(archive_rec_li_result)
|
||||
|
||||
return archive_rec_li
|
||||
|
||||
Reference in New Issue
Block a user