From 7e15211fd232d403d7e2e34faa3472c70f48edac Mon Sep 17 00:00:00 2001 From: MMXX Date: Wed, 12 Jan 2022 14:40:33 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=85=E7=90=86=E7=AD=BE=E5=90=8D=E4=B8=B4?= =?UTF-8?q?=E6=97=B6=E6=95=B0=E6=8D=AE?= 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/storage.py | 5 ----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/fir_ser/api/utils/app/supersignutils.py b/fir_ser/api/utils/app/supersignutils.py index 430ec89..711406f 100644 --- a/fir_ser/api/utils/app/supersignutils.py +++ b/fir_ser/api/utils/app/supersignutils.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 diff --git a/fir_ser/api/views/storage.py b/fir_ser/api/views/storage.py index da2bce0..98af6a2 100644 --- a/fir_ser/api/views/storage.py +++ b/fir_ser/api/views/storage.py @@ -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):