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