修复清理开发者脏数据失败问题

dependabot/npm_and_yarn/fir_admin/url-parse-1.5.10
nineven 3 years ago
parent f5ffc3632f
commit 10ab90a104
  1. 4
      fir_ser/api/utils/app/supersignutils.py
  2. 2
      fir_ser/api/views/apps.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

@ -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}")

Loading…
Cancel
Save