fix locations
This commit is contained in:
@@ -43,6 +43,9 @@ class WebContentsService(BaseService):
|
|||||||
# web_contents_data[""] = ""
|
# web_contents_data[""] = ""
|
||||||
# Do we have this subsction
|
# Do we have this subsction
|
||||||
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
if membersSubResult:
|
if membersSubResult:
|
||||||
member_sub = {
|
member_sub = {
|
||||||
'id': membersSubResult.id,
|
'id': membersSubResult.id,
|
||||||
@@ -61,6 +64,9 @@ class WebContentsService(BaseService):
|
|||||||
"added": membersSubResult.added,
|
"added": membersSubResult.added,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
WebContentsService.get_site_imges_data(str(provision_uid, membersSubResult.primary_server),
|
||||||
|
str(membersSubResult.provision_port))
|
||||||
|
|
||||||
if membersSubResult.colorstyle is not None and membersSubResult.colorstyle !='':
|
if membersSubResult.colorstyle is not None and membersSubResult.colorstyle !='':
|
||||||
# is this a valid olor scheme
|
# is this a valid olor scheme
|
||||||
colorStyle = ProductsColorStyle.get_colorstyle_by_product_id_and_uid(membersSubResult.product_id, membersSubResult.colorstyle)
|
colorStyle = ProductsColorStyle.get_colorstyle_by_product_id_and_uid(membersSubResult.product_id, membersSubResult.colorstyle)
|
||||||
@@ -96,8 +102,6 @@ class WebContentsService(BaseService):
|
|||||||
latitude = data.get('latitude', '')
|
latitude = data.get('latitude', '')
|
||||||
longitude = data.get('longitude', '')
|
longitude = data.get('longitude', '')
|
||||||
|
|
||||||
WebContentsService.get_site_imges_data(provision_uid)
|
|
||||||
|
|
||||||
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
||||||
if not membersSubResult:
|
if not membersSubResult:
|
||||||
return {
|
return {
|
||||||
@@ -135,14 +139,14 @@ class WebContentsService(BaseService):
|
|||||||
return jsonify({"message": "Internal Server Error"}), 500
|
return jsonify({"message": "Internal Server Error"}), 500
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_site_imges_data(provision_uid):
|
def get_site_imges_data(provision_uid, primary_serve,primary_server):
|
||||||
|
|
||||||
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
# membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
||||||
|
#
|
||||||
|
# if not membersSubResult:
|
||||||
|
# return None
|
||||||
|
|
||||||
if not membersSubResult:
|
destination_server = "http://"+ str(primary_server)+":"+str(primary_server)
|
||||||
return None
|
|
||||||
|
|
||||||
destination_server = "http://"+ str(membersSubResult.primary_server)+":"+str(membersSubResult.provision_port)
|
|
||||||
api_url = destination_server + "/api"
|
api_url = destination_server + "/api"
|
||||||
try:
|
try:
|
||||||
logger.info(f"api_url: {str(api_url)}")
|
logger.info(f"api_url: {str(api_url)}")
|
||||||
|
|||||||
Reference in New Issue
Block a user