Work on order related endpoints.

This commit is contained in:
Scott Idem
2021-11-22 18:32:44 -05:00
parent b6a8e172a4
commit 4fa32f63fd
3 changed files with 3 additions and 10 deletions

View File

@@ -168,7 +168,7 @@ def get_order_line_rec_list(
# enabled: str = 'enabled', # enabled, disabled, all
limit: int = 1000,
) -> list|bool:
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
if for_obj_id := redis_lookup_id_random(record_id_random=for_obj_id, table_name=for_obj_type): pass
@@ -257,7 +257,7 @@ def get_order_line_rec_list(
{sql_prod_type}
{sql_status}
{sql_from_to_datetime}
ORDER BY order_line.name, `order_line`.created_on DESC, `order_line`.updated_on DESC
ORDER BY `order_line`.created_on DESC, `order_line`.updated_on DESC
{sql_limit};
"""
log.debug(sql)

View File

@@ -230,7 +230,7 @@ async def get_obj_id_order_list(
x_account_id: str = Header(..., min_length=11, max_length=22),
response: Response = Response,
):
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
if obj_type in ['account', 'person']:
@@ -240,10 +240,6 @@ async def get_obj_id_order_list(
log.warning('Likely bad request')
return mk_resp(data=False, status_code=400, response=response) # Bad Request
log.debug(from_datetime)
log.debug(to_datetime)
if order_rec_list_result := get_order_rec_list(
for_obj_type = obj_type,
for_obj_id = obj_id,

View File

@@ -45,9 +45,6 @@ async def get_obj_id_order_line_list(
log.warning('Likely bad request')
return mk_resp(data=False, status_code=400, response=response) # Bad Request
log.debug(from_datetime)
log.debug(to_datetime)
if order_line_rec_list_result := get_order_line_rec_list(
for_obj_type = obj_type,
for_obj_id = obj_id,