Contact return
This commit is contained in:
@@ -134,7 +134,7 @@ class ContactService(BaseService):
|
|||||||
title = data.get('title', '')
|
title = data.get('title', '')
|
||||||
email = data.get('email', '')
|
email = data.get('email', '')
|
||||||
sender = data.get('sender', '')
|
sender = data.get('sender', '')
|
||||||
contact_result = []
|
contact_result = None
|
||||||
memSubb = MembersProducts.get_member_product_by_subscription_uid(subscription_uid)
|
memSubb = MembersProducts.get_member_product_by_subscription_uid(subscription_uid)
|
||||||
if memSubb:
|
if memSubb:
|
||||||
member_id = memSubb.member_id,
|
member_id = memSubb.member_id,
|
||||||
@@ -144,11 +144,12 @@ class ContactService(BaseService):
|
|||||||
contact_result = ProductsContacts.add_product_contact(
|
contact_result = ProductsContacts.add_product_contact(
|
||||||
member_id, product_id, subscription_uid, title, email, sender, message
|
member_id, product_id, subscription_uid, title, email, sender, message
|
||||||
)
|
)
|
||||||
|
# if contact_result and contact_result.uid != '':
|
||||||
|
#
|
||||||
response_data = {
|
response_data = {
|
||||||
"last_message": datetime.datetime.utcnow(),
|
"last_message": datetime.datetime.utcnow(),
|
||||||
"subscription_uid": subscription_uid,
|
"subscription_uid": subscription_uid,
|
||||||
"result": contact_result,
|
"result": contact_result.uid if contact_result and contact_result.uid != '' else None,
|
||||||
}
|
}
|
||||||
|
|
||||||
return ResponseHelper.success(data=response_data)
|
return ResponseHelper.success(data=response_data)
|
||||||
|
|||||||
Reference in New Issue
Block a user