order id
This commit is contained in:
@@ -98,7 +98,9 @@ class Products(db.Model):
|
||||
"""
|
||||
productItem = cls.query.filter_by(product_id = product_id).first()
|
||||
if not productItem:
|
||||
raise ValueError(f"pProduct with ID {product_id} does not exist.")
|
||||
# raise ValueError(f"pProduct with ID {product_id} does not exist.")
|
||||
logger.error(f"Product with ID {product_id} does not exist.")
|
||||
return None
|
||||
return productItem
|
||||
|
||||
def to_dict(self):
|
||||
|
||||
@@ -37,7 +37,7 @@ class ProductsDetails(db.Model):
|
||||
"""
|
||||
productItem = cls.query.filter_by(product_id = product_id).first()
|
||||
if not productItem:
|
||||
raise ValueError(f"pProduct with ID {product_id} does not exist.")
|
||||
raise ValueError(f"Product with ID {product_id} does not exist.")
|
||||
return productItem
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user