From ec0bdcce9e8ce1435370ef68658ae330f7651521 Mon Sep 17 00:00:00 2001 From: ibuler Date: Thu, 12 Sep 2019 18:08:00 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9id=20cache=20api?= =?UTF-8?q?=20mixin?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/common/mixins/api.py | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/common/mixins/api.py b/apps/common/mixins/api.py index 96c170670..21f0394ce 100644 --- a/apps/common/mixins/api.py +++ b/apps/common/mixins/api.py @@ -46,6 +46,7 @@ class IDInCacheFilterMixin(object): resources_id = cache.get(cache_key) if not resources_id or not isinstance(resources_id, list): queryset = queryset.none() + return queryset queryset = queryset.filter(id__in=resources_id) return queryset