From d15b5838048f98573b2578e74a6b0cb81b423ee2 Mon Sep 17 00:00:00 2001 From: MMXX Date: Tue, 15 Mar 2022 05:31:27 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- fir_ser/common/utils/caches.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/fir_ser/common/utils/caches.py b/fir_ser/common/utils/caches.py index 5a95932..6d61491 100644 --- a/fir_ser/common/utils/caches.py +++ b/fir_ser/common/utils/caches.py @@ -34,15 +34,19 @@ def sync_download_times_by_app_id(app_ids): def del_cache_response_by_short(app_id, udid=''): app_obj = Apps.objects.filter(app_id=app_id).first() - invalid_app_cache(app_obj) - invalid_app_cache(app_obj.has_combo) + if app_obj: + invalid_app_cache(app_obj) + if app_obj.has_combo: + invalid_app_cache(app_obj.has_combo) def del_cache_by_delete_app(app_id): invalid_app_download_times_cache(app_id) app_obj = Apps.objects.filter(app_id=app_id).first() - invalid_app_cache(app_obj) - invalid_app_cache(app_obj.has_combo) + if app_obj: + invalid_app_cache(app_obj) + if app_obj.has_combo: + invalid_app_cache(app_obj.has_combo) def del_cache_by_app_id(app_id, user_obj):