Bug fix in order cart line model. Need to create another _Base for order_line and order_cart_line

This commit is contained in:
Scott Idem
2021-08-07 20:27:45 -04:00
parent 5e02b424a8
commit 65b5e6ade6
7 changed files with 53 additions and 18 deletions

View File

@@ -40,9 +40,7 @@ def load_order_cfg_obj(
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() ###

View File

@@ -39,8 +39,8 @@ def load_order_line_obj(
order_line_id: int|str,
limit: int = 1000,
by_alias: bool = True,
exclude_unset: bool = True,
model_as_dict: bool = False,
exclude_unset: bool = True, # NOTE: Normally this is True
model_as_dict: bool = False, # NOTE: Normally this is False
) -> Order_Line_Base|dict|bool:
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
@@ -51,7 +51,7 @@ def load_order_line_obj(
if order_line_rec := sql_select(table_name='v_order_line', record_id=order_line_id): pass
else: return False
#log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(order_line_rec)
try: