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