From 21fe5665e21341aed98f590d6714eaaa8d5b9cc9 Mon Sep 17 00:00:00 2001 From: nineven Date: Mon, 1 Feb 2021 16:19:00 +0800 Subject: [PATCH] =?UTF-8?q?=E8=8B=B9=E6=9E=9C=E5=BC=80=E5=8F=91=E8=B4=A6?= =?UTF-8?q?=E6=88=B7=E4=BB=85=E5=90=8C=E6=AD=A5enable=E8=AE=BE=E5=A4=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/utils/app/iossignapi.py | 2 +- fir_ser/api/utils/apple/appleapiv3.py | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/fir_ser/api/utils/app/iossignapi.py b/fir_ser/api/utils/app/iossignapi.py index de1ec70..a061e76 100644 --- a/fir_ser/api/utils/app/iossignapi.py +++ b/fir_ser/api/utils/app/iossignapi.py @@ -269,7 +269,7 @@ class AppDeveloperApiV2(object): result = {} try: apple_obj = AppStoreConnectApi(self.issuer_id, self.private_key_id, self.p8key) - devices_obj_list = apple_obj.get_all_devices() + devices_obj_list = apple_obj.list_enabled_devices() if devices_obj_list: return True, devices_obj_list except Exception as e: diff --git a/fir_ser/api/utils/apple/appleapiv3.py b/fir_ser/api/utils/apple/appleapiv3.py index e2491a7..5e5f98d 100644 --- a/fir_ser/api/utils/apple/appleapiv3.py +++ b/fir_ser/api/utils/apple/appleapiv3.py @@ -678,6 +678,10 @@ class AppStoreConnectApi(DevicesAPI, BundleIDsAPI, BundleIDsCapabilityAPI, Profi req = self.list_devices() return self.__device_store(req) + def list_enabled_devices(self): + req = self.list_devices() + return self.__device_store(req) + def get_all_bundle_ids(self): req = self.list_bundle_ids() return self.__bundle_ids_store(req) @@ -763,7 +767,7 @@ class AppStoreConnectApi(DevicesAPI, BundleIDsAPI, BundleIDsCapabilityAPI, Profi if device_id_list is None: device_id_list = [] if not device_id_list: - device_id_list = [device.id for device in self.get_all_devices()] + device_id_list = [device.id for device in self.list_enabled_devices()] profile_obj = self.list_profile_by_profile_name(profile_name) if isinstance(profile_obj, Profiles):