Bug fix in order cart line model. Need to create another _Base for order_line and order_cart_line
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user