From 10ab90a104d9def6c683bf20ad1fa31036906337 Mon Sep 17 00:00:00 2001 From: nineven Date: Thu, 3 Feb 2022 12:06:29 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=B8=85=E7=90=86=E5=BC=80?= =?UTF-8?q?=E5=8F=91=E8=80=85=E8=84=8F=E6=95=B0=E6=8D=AE=E5=A4=B1=E8=B4=A5?= =?UTF-8?q?=E9=97=AE=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 | 4 ++-- fir_ser/api/views/apps.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/fir_ser/api/utils/app/supersignutils.py b/fir_ser/api/utils/app/supersignutils.py index 9b268b9..d8e0417 100644 --- a/fir_ser/api/utils/app/supersignutils.py +++ b/fir_ser/api/utils/app/supersignutils.py @@ -19,7 +19,7 @@ from api.models import APPSuperSignUsedInfo, AppUDID, AppIOSDeveloperInfo, AppRe UDIDsyncDeveloper, DeveloperAppID, DeveloperDevicesID, IosDeveloperPublicPoolBill, UserInfo, AppleDeveloperToAppUse from api.utils.app.iossignapi import ResignApp, AppDeveloperApiV2 from api.utils.modelutils import get_ios_developer_public_num, check_ipa_is_latest_sign, \ - get_developer_can_used_from_public_sign, update_or_create_developer_udid_info + get_developer_can_used_from_public_sign, update_or_create_developer_udid_info, check_uid_has_relevant from api.utils.response import BaseResponse from api.utils.serializer import BillAppInfoSerializer, BillDeveloperInfoSerializer from api.utils.storage.caches import del_cache_response_by_short, send_msg_over_limit, check_app_permission, \ @@ -921,7 +921,7 @@ class IosUtils(object): for developer_id in developer_id_lists: developer_obj = AppIOSDeveloperInfo.objects.filter(pk=developer_id[0]).first() - if developer_obj and developer_obj.user_id == app_obj.user_id: + if developer_obj and (developer_obj.user_id == app_obj.user_id or check_uid_has_relevant(developer_obj.user_id.uid,app_obj.user_id.uid)): IosUtils.clean_super_sign_things_by_app_obj(app_obj, developer_obj) @staticmethod diff --git a/fir_ser/api/views/apps.py b/fir_ser/api/views/apps.py index b0004c5..8d156c6 100644 --- a/fir_ser/api/views/apps.py +++ b/fir_ser/api/views/apps.py @@ -116,7 +116,7 @@ class AppInfoView(APIView): if app_obj: app_serializer = AppsSerializer(app_obj, context={"storage": Storage(request.user)}) res.data = app_serializer.data - count = APPToDeveloper.objects.filter(app_id=app_obj, developerid__user_id=request.user).count() + count = APPToDeveloper.objects.filter(app_id=app_obj).count() res.data["count"] = count else: logger.error(f"app_id:{app_id} is not found in user:{request.user}")