清理签名临时数据

dependabot/npm_and_yarn/fir_admin/url-parse-1.5.10
MMXX 3 years ago
parent ae58a71ee4
commit 7e15211fd2
  1. 4
      fir_ser/api/utils/app/supersignutils.py
  2. 5
      fir_ser/api/views/storage.py

@ -503,13 +503,15 @@ class IosUtils(object):
apptodev_obj.binary_file = random_file_name
old_release_file = apptodev_obj.release_file
apptodev_obj.release_file = release_obj.release_id
apptodev_obj.save(update_fields=['binary_file', 'release_file'])
apptodev_obj.save(update_fields=['binary_file', 'release_file', 'updated_time'])
if storage_obj.get_storage_type() in [1, 2] and old_release_file != release_obj.release_id:
logger.warning(f"update sign file , now clean ole {old_release_file}.ipa file")
delete_local_files(old_release_file + ".ipa")
else:
APPToDeveloper.objects.create(developerid_id=developer_obj_id, app_id=app_obj,
binary_file=random_file_name, release_file=release_obj.release_id)
if storage_obj.get_storage_type() in [1, 2]:
delete_local_files(random_file_name + ".ipa")
return True
@staticmethod

@ -58,11 +58,6 @@ class StorageView(APIView):
res.storage = use_storage_obj.id
else:
res.storage = -1 # 默认存储
admin_storage = UserInfo.objects.filter(is_superuser=True).order_by('pk').first()
res.is_admin_storage = False
if admin_storage and admin_storage.uid == request.user.uid:
res.is_admin_storage = True
return Response(res.dict)
def post(self, request):

Loading…
Cancel
Save