memberSubscription
This commit is contained in:
@@ -38,7 +38,7 @@ class MyProductsService(BaseService):
|
|||||||
}, 400
|
}, 400
|
||||||
|
|
||||||
logger.info(f"GET HERE ******************************** : {data}", exc_info=True)
|
logger.info(f"GET HERE ******************************** : {data}", exc_info=True)
|
||||||
mumberSub = MembersProducts.get_member_product_by_product__member_id(member_id, product_id)
|
mumberSub = MembersProducts.get_member_product_by_product_member_id(member_id, product_id)
|
||||||
|
|
||||||
if not mumberSub:
|
if not mumberSub:
|
||||||
logger.error(f"Ready to add data to tables")
|
logger.error(f"Ready to add data to tables")
|
||||||
@@ -129,6 +129,12 @@ class MyProductsService(BaseService):
|
|||||||
product_data = Products.get_product_by_product_id(product_id)
|
product_data = Products.get_product_by_product_id(product_id)
|
||||||
product_description = ProductsDetails.get_product_details_with_product_id('A000002')
|
product_description = ProductsDetails.get_product_details_with_product_id('A000002')
|
||||||
productDataStatus = product_data.status
|
productDataStatus = product_data.status
|
||||||
|
|
||||||
|
memberSubscription = MembersProducts.get_member_product_by_product_member_id(member_id, product_id)
|
||||||
|
if memberSubscription is not None:
|
||||||
|
productDataStatus = memberSubscription.status
|
||||||
|
|
||||||
|
|
||||||
# "banner": "banner.jpg",
|
# "banner": "banner.jpg",
|
||||||
myproduct_data = {
|
myproduct_data = {
|
||||||
"myproudct": {
|
"myproudct": {
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ class MembersProducts(db.Model):
|
|||||||
return member_products
|
return member_products
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def get_member_product_by_product__member_id(cls, member_id, product_id):
|
def get_member_product_by_product_member_id(cls, member_id, product_id):
|
||||||
member_product = cls.query.filter_by(member_id=str(member_id), product_id=str(product_id))
|
member_product = cls.query.filter_by(member_id=str(member_id), product_id=str(product_id))
|
||||||
if not member_product:
|
if not member_product:
|
||||||
return None
|
return None
|
||||||
|
|||||||
Reference in New Issue
Block a user