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

@@ -121,6 +121,15 @@ class Order_Cart_Line_Base(BaseModel):
return redis_lookup_id_random(record_id_random=values['product_for_id_random'], table_name=values['product_for_type'])
return None
@validator('curr_product_id', always=True)
def curr_product_id_lookup(cls, v, values, **kwargs):
log.setLevel(logging.WARNING)
log.debug(locals())
if values.get('curr_product_id_random', None):
return redis_lookup_id_random(record_id_random=values['curr_product_id_random'], table_name='product')
return None
@validator('curr_product_for_id', always=True)
def curr_product_for_id_lookup(cls, v, values, **kwargs):
log.setLevel(logging.WARNING)