From e8e6ea962a960f36f8f4f8bf6d80f6ae0c2c0ea3 Mon Sep 17 00:00:00 2001 From: MMXX Date: Sun, 19 Dec 2021 21:19:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=B7=B2=E7=9F=A5=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/api/utils/app/supersignutils.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fir_ser/api/utils/app/supersignutils.py b/fir_ser/api/utils/app/supersignutils.py index d40db53..8251fdd 100644 --- a/fir_ser/api/utils/app/supersignutils.py +++ b/fir_ser/api/utils/app/supersignutils.py @@ -284,16 +284,17 @@ def get_new_developer_by_app_obj(user_objs, app_obj, apple_to_app=False): used_number = get_developer_udided(developer_obj)[2] + get_developer_can_used_from_public_sign( developer_obj.user_id) if used_number < developer_obj.usable_number: - app_used_number = DeveloperDevicesID.objects.filter(developerid=developer_obj) if apple_to_app: apple_to_app_obj = AppleDeveloperToAppUse.objects.filter(app_id=app_obj, developerid=developer_obj).first() if apple_to_app_obj: # 通过配置的专属分配数量进行过滤 + app_used_number = DeveloperDevicesID.objects.filter(developerid=developer_obj) if app_used_number.filter(app_id=app_obj).distinct().count() < apple_to_app_obj.usable_number: can_used_developer_pk_list.append(developer_obj.pk) else: - if app_used_number.distinct().count() < developer_obj.app_limit_number: + app_used_count = DeveloperAppID.objects.filter(developerid=developer_obj).distinct().count() + if app_used_count < developer_obj.app_limit_number: can_used_developer_pk_list.append(developer_obj.pk) return can_used_developer_pk_list