From dcdf2aac5cc84493acfd4a9d5ed05fe795414736 Mon Sep 17 00:00:00 2001 From: nineven Date: Sat, 30 Jan 2021 18:29:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E8=B6=85=E7=BA=A7=E7=AD=BE?= =?UTF-8?q?=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/utils/app/iossignapi.py | 8 ++------ fir_ser/api/utils/apple/appleapiv3.py | 4 ++-- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/fir_ser/api/utils/app/iossignapi.py b/fir_ser/api/utils/app/iossignapi.py index 143498d..95008e0 100644 --- a/fir_ser/api/utils/app/iossignapi.py +++ b/fir_ser/api/utils/app/iossignapi.py @@ -219,12 +219,8 @@ class AppDeveloperApiV2(object): result = {} try: apple_obj = AppStoreConnectApi(self.issuer_id, self.private_key_id, self.p8key) - profile_obj = apple_obj.list_profile_by_profile_name(app_id) - if profile_obj: - if apple_obj.delete_profile_by_id(profile_obj.id): - pass - if apple_obj.delete_bundle_by_identifier(bundleId+app_id): - return True, profile_obj + if apple_obj.delete_bundle_by_identifier(bundleId + app_id): + return True, {} except Exception as e: logger.error("ios developer delete profile Failed Exception:%s" % e) diff --git a/fir_ser/api/utils/apple/appleapiv3.py b/fir_ser/api/utils/apple/appleapiv3.py index 4a10690..be1875d 100644 --- a/fir_ser/api/utils/apple/appleapiv3.py +++ b/fir_ser/api/utils/apple/appleapiv3.py @@ -753,8 +753,8 @@ class AppStoreConnectApi(DevicesAPI, BundleIDsAPI, BundleIDsCapabilityAPI, Profi def delete_bundle_by_identifier(self, identifier): identifier_obj = self.list_bundle_ids_by_identifier(identifier) - if identifier_obj and isinstance(identifier_obj, list): - req = self.delete_bundle_id_by_id(identifier_obj[0].id) + if isinstance(identifier_obj,BundleIds): + req = self.delete_bundle_id_by_id(identifier_obj.id) if req.status_code == 204: return True