From 70912cdb95a88316b58a332dffb5ed036c5130bd Mon Sep 17 00:00:00 2001 From: wangruidong <940853815@qq.com> Date: Thu, 28 Nov 2024 10:28:33 +0800 Subject: [PATCH] fix: Expand resource_type filter to include raw type --- apps/audits/filters.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/audits/filters.py b/apps/audits/filters.py index b82eadad3..ac84aaf7f 100644 --- a/apps/audits/filters.py +++ b/apps/audits/filters.py @@ -63,7 +63,7 @@ class OperateLogFilterSet(BaseFilterSet): with translation.override(current_lang): mapper = {str(m._meta.verbose_name): m._meta.verbose_name_raw for m in apps.get_models()} tp = mapper.get(resource_type) - queryset = queryset.filter(resource_type=tp) + queryset = queryset.filter(resource_type__in=[tp, resource_type]) return queryset class Meta: