From 1d75c8ed23cf1a87f9fa1d539b0e60d7ff3448ae Mon Sep 17 00:00:00 2001 From: nineven Date: Mon, 18 Apr 2022 17:04:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E5=BC=82=E5=B8=B8=E6=B3=A8?= =?UTF-8?q?=E5=86=8C=E9=80=BB=E8=BE=91=EF=BC=8C=E4=BF=AE=E5=A4=8D=E8=AE=BE?= =?UTF-8?q?=E7=BD=AE=E8=AE=BE=E5=A4=87=E7=8A=B6=E6=80=81=E8=BF=94=E5=9B=9E?= =?UTF-8?q?=E5=BC=82=E5=B8=B8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_client/vue.config.js | 2 +- fir_ser/xsign/utils/iossignapi.py | 2 +- fir_ser/xsign/utils/supersignutils.py | 21 +++++++++++++-------- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/fir_client/vue.config.js b/fir_client/vue.config.js index 120c7ca..50aee10 100644 --- a/fir_client/vue.config.js +++ b/fir_client/vue.config.js @@ -82,7 +82,7 @@ if (page) { } } -const version='2.3.3'; +const version='2.3.5'; const pro_base_env = { baseUrl: 'https://flyapps.cn', diff --git a/fir_ser/xsign/utils/iossignapi.py b/fir_ser/xsign/utils/iossignapi.py index 2aebc7d..ca53cef 100644 --- a/fir_ser/xsign/utils/iossignapi.py +++ b/fir_ser/xsign/utils/iossignapi.py @@ -447,7 +447,7 @@ class AppDeveloperApiV2(object): device_obj = apple_obj.disabled_device(device_id, device_name, device_udid) logger.info(f"issuer_id:{self.issuer_id} device_obj:{device_obj} result:{status}") if device_obj and isinstance(device_obj, Devices): - return True, result + return True, device_obj raise Exception(str(device_obj)) except Exception as e: err_msg = str(e) diff --git a/fir_ser/xsign/utils/supersignutils.py b/fir_ser/xsign/utils/supersignutils.py index 93a6553..2ff7c76 100644 --- a/fir_ser/xsign/utils/supersignutils.py +++ b/fir_ser/xsign/utils/supersignutils.py @@ -694,18 +694,18 @@ class IosUtils(object): failed_call_prefix, set_failed_callback) if not status: # 已经包含异常操作,暂定 + msg = result sync_device_obj = UDIDsyncDeveloper.objects.filter(udid=device_udid, developerid=developer_obj, status__in=[DeviceStatus.PROCESSING, DeviceStatus.INELIGIBLE]).first() if sync_device_obj: - msg = result change_developer_abnormal_status(developer_status, user_obj, developer_obj, app_obj) if UserConfig(user_obj).DEVELOPER_WAIT_ABNORMAL_DEVICE: update_or_create_abnormal_device(sync_device_obj, user_obj, app_obj, client_ip) msg = 'DEVELOPER_WAIT_ABNORMAL_DEVICE' - return False, msg - sync_device_obj.status = True + return False, msg + sync_device_obj.status = result.statue sync_device_obj.save(update_fields=['status']) else: @@ -801,12 +801,17 @@ class IosUtils(object): if status: for device_obj in device_obj_list: if device_obj.status not in [DeviceStatus.ENABLED, DeviceStatus.DISABLED]: - developer_obj.status = AppleDeveloperStatus.DEVICE_ABNORMAL - developer_obj.save(update_fields=['status']) err_msg = f'issuer_id:{developer_obj.issuer_id} device status unexpected. device_obj:{device_obj}' - add_sign_message(developer_obj.user_id, developer_obj, None, '开发者设备状态异常', - err_msg, False) - return False, err_msg + if developer_obj.status != AppleDeveloperStatus.DEVICE_ABNORMAL: + developer_obj.status = AppleDeveloperStatus.DEVICE_ABNORMAL + developer_obj.save(update_fields=['status']) + add_sign_message(developer_obj.user_id, developer_obj, None, '开发者设备状态异常', + err_msg, False) + if serial: + if serial == device_obj.id: + return False, err_msg + else: + return False, err_msg else: if serial and serial == device_obj.id: sync_device_obj, _ = update_or_create_developer_udid_info(device_obj, developer_obj)