Bug fix in order cart line model.

This commit is contained in:
Scott Idem
2021-08-07 18:59:35 -04:00
parent 562a3ffa36
commit 5e02b424a8
4 changed files with 6 additions and 7 deletions

View File

@@ -171,7 +171,7 @@ async def get_order_obj(
by_alias: bool = True,
exclude_unset: bool = True,
):
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
if order_obj := load_order_obj(
@@ -184,7 +184,6 @@ async def get_order_obj(
inc_order_line_list = inc_order_line_list,
inc_order_cfg = inc_order_cfg,
):
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(order_obj)
data = order_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset)
return mk_resp(data=data)

View File

@@ -46,7 +46,7 @@ async def post_order_cart_obj(
# Update 2021-08-02 (partially)
@router.patch('/{order_cart_id}', response_model=Resp_Body_Base)
async def patch_order_cart_obj(
order_cart_id: str = Query(..., min_length=1, max_length=22),
order_cart_id: str = Query(..., min_length=11, max_length=22),
order_cart_obj: Order_Cart_Base = None,
repl_order_cart_line_list: Optional[bool] = False, # Replace all the lines instead of trying to update
# was repl_order_cart_line_list # NOTE: It was with out _list, just _li
@@ -57,7 +57,7 @@ async def patch_order_cart_obj(
by_alias: Optional[bool] = True,
exclude_unset: Optional[bool] = True,
):
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.debug(locals())
log.debug(order_cart_obj)