mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-29 11:23:17 +00:00
fix: Expand resource_type filter to include raw type
This commit is contained in:
parent
7afd25ca9c
commit
70912cdb95
@ -63,7 +63,7 @@ class OperateLogFilterSet(BaseFilterSet):
|
|||||||
with translation.override(current_lang):
|
with translation.override(current_lang):
|
||||||
mapper = {str(m._meta.verbose_name): m._meta.verbose_name_raw for m in apps.get_models()}
|
mapper = {str(m._meta.verbose_name): m._meta.verbose_name_raw for m in apps.get_models()}
|
||||||
tp = mapper.get(resource_type)
|
tp = mapper.get(resource_type)
|
||||||
queryset = queryset.filter(resource_type=tp)
|
queryset = queryset.filter(resource_type__in=[tp, resource_type])
|
||||||
return queryset
|
return queryset
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
|
Loading…
Reference in New Issue
Block a user