Work on data store and related
This commit is contained in:
@@ -224,12 +224,14 @@ async def get_obj_li(
|
||||
|
||||
base_name = obj_type_li[obj_name]['base_name']
|
||||
|
||||
resp_data_li = []
|
||||
for record in sql_result:
|
||||
resp_data = base_name(**record).dict(by_alias=by_alias, exclude_unset=exclude_unset)
|
||||
resp_data_li.append(resp_data)
|
||||
if sql_result:
|
||||
resp_data_li = []
|
||||
for record in sql_result:
|
||||
resp_data = base_name(**record).dict(by_alias=by_alias, exclude_unset=exclude_unset)
|
||||
resp_data_li.append(resp_data)
|
||||
|
||||
return mk_resp(data=resp_data_li, response=response)
|
||||
return mk_resp(data=resp_data_li, response=response)
|
||||
else: return mk_resp(data=None, response=response, status_code=404)
|
||||
|
||||
|
||||
#@router.get('/{obj_type_l1}/{obj_id_int}')
|
||||
@@ -267,7 +269,7 @@ async def get_obj(
|
||||
- /order/cart/line = order_cart_line
|
||||
- /lu/some_lookup = lu_some_lookup
|
||||
"""
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
debug_data = {}
|
||||
|
||||
Reference in New Issue
Block a user