reformat bcode

This commit is contained in:
CHIEFSOFT\ameye
2026-01-10 23:59:01 -05:00
parent f34c5c4cfb
commit 424338e5f7
+5 -7
View File
@@ -10,6 +10,7 @@ from app.models import MembersProductsSettings, MembersProducts, ProductsColorSt
from threading import Thread from threading import Thread
import requests import requests
class WebContentsService(BaseService): class WebContentsService(BaseService):
@staticmethod @staticmethod
@@ -44,8 +45,6 @@ class WebContentsService(BaseService):
# 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,
@@ -64,12 +63,13 @@ class WebContentsService(BaseService):
"added": membersSubResult.added, "added": membersSubResult.added,
} }
WebContentsService.get_site_imges_data(str(provision_uid, membersSubResult.primary_server), WebContentsService.get_site_imges_data(provision_uid, membersSubResult.primary_server,
str(membersSubResult.provision_port)) 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)
if colorStyle and colorStyle.color_style != '': if colorStyle and colorStyle.color_style != '':
web_contents_data["internal_template_style"] = colorStyle.color_style web_contents_data["internal_template_style"] = colorStyle.color_style
@@ -85,14 +85,12 @@ class WebContentsService(BaseService):
# The template set up # The template set up
# web_contents_data["web_images"]=[] # web_contents_data["web_images"]=[]
return web_contents_data return web_contents_data
except Exception as e: except Exception as e:
logger.error(f"An error occurred while getting dashboard data: {str(e)}", exc_info=True) logger.error(f"An error occurred while getting dashboard data: {str(e)}", exc_info=True)
return jsonify({"message": "Internal Server Error"}), 500 return jsonify({"message": "Internal Server Error"}), 500
@staticmethod @staticmethod
def get_web_trafic_data(data): def get_web_trafic_data(data):
provision_uid = data.get('provision_uid', '') provision_uid = data.get('provision_uid', '')