reformat bcode
This commit is contained in:
@@ -10,6 +10,7 @@ from app.models import MembersProductsSettings, MembersProducts, ProductsColorSt
|
||||
from threading import Thread
|
||||
import requests
|
||||
|
||||
|
||||
class WebContentsService(BaseService):
|
||||
|
||||
@staticmethod
|
||||
@@ -44,8 +45,6 @@ class WebContentsService(BaseService):
|
||||
# Do we have this subsction
|
||||
membersSubResult = MembersProducts.get_member_product_by_subscription_uid(provision_uid)
|
||||
|
||||
|
||||
|
||||
if membersSubResult:
|
||||
member_sub = {
|
||||
'id': membersSubResult.id,
|
||||
@@ -64,12 +63,13 @@ class WebContentsService(BaseService):
|
||||
"added": membersSubResult.added,
|
||||
}
|
||||
|
||||
WebContentsService.get_site_imges_data(str(provision_uid, membersSubResult.primary_server),
|
||||
str(membersSubResult.provision_port))
|
||||
WebContentsService.get_site_imges_data(provision_uid, membersSubResult.primary_server,
|
||||
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)
|
||||
colorStyle = ProductsColorStyle.get_colorstyle_by_product_id_and_uid(membersSubResult.product_id,
|
||||
membersSubResult.colorstyle)
|
||||
if colorStyle and colorStyle.color_style != '':
|
||||
web_contents_data["internal_template_style"] = colorStyle.color_style
|
||||
|
||||
@@ -85,14 +85,12 @@ class WebContentsService(BaseService):
|
||||
# The template set up
|
||||
# web_contents_data["web_images"]=[]
|
||||
|
||||
|
||||
return web_contents_data
|
||||
|
||||
except Exception as e:
|
||||
logger.error(f"An error occurred while getting dashboard data: {str(e)}", exc_info=True)
|
||||
return jsonify({"message": "Internal Server Error"}), 500
|
||||
|
||||
|
||||
@staticmethod
|
||||
def get_web_trafic_data(data):
|
||||
provision_uid = data.get('provision_uid', '')
|
||||
|
||||
Reference in New Issue
Block a user