A lot of unplanned clean up and created some new/missing methods and routes. Mainly working on order and order_cart related stuff.
This commit is contained in:
@@ -15,9 +15,9 @@ def load_order_cfg_obj(
|
||||
account_id: int|str,
|
||||
by_alias: bool = True,
|
||||
exclude_unset: bool = True,
|
||||
model_as_dict: bool = False,
|
||||
model_as_dict: bool = True,
|
||||
) -> Order_Cfg_Base|dict|bool:
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(locals())
|
||||
|
||||
if account_id := redis_lookup_id_random(record_id_random=account_id, table_name='account'): pass
|
||||
@@ -29,16 +29,20 @@ def load_order_cfg_obj(
|
||||
field_value = account_id,
|
||||
): pass
|
||||
else: return False
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(order_cfg_rec)
|
||||
|
||||
try:
|
||||
order_cfg_obj = Order_Cfg_Base(**order_cfg_rec)
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(order_cfg_obj)
|
||||
except ValidationError as e:
|
||||
log.error(e.json())
|
||||
|
||||
if model_as_dict:
|
||||
log.debug('**** HERE dict ****')
|
||||
return order_cfg_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset) # pylint: disable=no-member
|
||||
else:
|
||||
log.debug('**** HERE obj ****')
|
||||
return order_cfg_obj
|
||||
# ### END ### API Order Cfg Methods ### load_order_cfg_obj() ###
|
||||
|
||||
Reference in New Issue
Block a user