office templates
This commit is contained in:
@@ -22,6 +22,15 @@ class CustomTemplates(db.Model):
|
||||
raise ValueError(f"Templates with Custom ID {custom_id} not found")
|
||||
return templates
|
||||
|
||||
@classmethod
|
||||
def get_custom_template_for_office(cls, filters):
|
||||
templates = cls.query.all()
|
||||
|
||||
if not templates:
|
||||
raise ValueError(f"Templates not found")
|
||||
return templates
|
||||
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
"id": self.id,
|
||||
|
||||
@@ -25,6 +25,15 @@ class ProductsTemplates(db.Model):
|
||||
raise ValueError(f"Templates with Product ID {product_id} not found")
|
||||
return templates
|
||||
|
||||
@classmethod
|
||||
def get_template_for_office(cls, filters):
|
||||
templates = cls.query.all()
|
||||
|
||||
if not templates:
|
||||
raise ValueError(f"Templates not found")
|
||||
return templates
|
||||
|
||||
|
||||
def to_dict(self):
|
||||
return {
|
||||
"id": self.id,
|
||||
|
||||
Reference in New Issue
Block a user