fix page data
This commit is contained in:
@@ -286,7 +286,7 @@ class OfficeDashboardService(BaseService):
|
||||
product_templates_data = []
|
||||
templates_data = []
|
||||
|
||||
membersSubResult, total_count = MembersProducts.get_member_product_by_subscription_uid(subscription_uid)
|
||||
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(subscription_uid)
|
||||
if membersSubResult:
|
||||
member_sub = {
|
||||
'id': membersSubResult.id,
|
||||
|
||||
@@ -65,7 +65,7 @@ class MembersProducts(db.Model):
|
||||
|
||||
@classmethod
|
||||
def get_member_product_by_subscription_uid(cls, subscription_uid):
|
||||
member_product = cls.query.filter_by(subscription_uid=str(subscription_uid)).all()
|
||||
member_product = cls.query.filter_by(uid=str(subscription_uid)).first()
|
||||
if not member_product:
|
||||
return None
|
||||
return member_product
|
||||
@@ -145,14 +145,10 @@ class MembersProducts(db.Model):
|
||||
# return 0
|
||||
|
||||
def to_dict(self):
|
||||
"""
|
||||
Convert the Loan object to a dictionary format for JSON serialization.
|
||||
"""
|
||||
|
||||
return {
|
||||
'id': self.id,
|
||||
'uid': self.uid,
|
||||
# 'name': self.products.name,
|
||||
# 'description': self.products.description,
|
||||
'product_id': self.product_id,
|
||||
'internal_url': self.internal_url,
|
||||
'external_url': self.external_url,
|
||||
|
||||
Reference in New Issue
Block a user