mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-09-01 07:27:35 +00:00
fix: 应用授权按type 过滤报错
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
from rest_framework.generics import ListAPIView
|
||||
from rest_framework.response import Response
|
||||
|
||||
from applications.filters import ApplicationFilter
|
||||
from common.mixins.api import CommonApiMixin
|
||||
from applications.api.mixin import (
|
||||
SerializeApplicationToTreeNodeMixin
|
||||
@@ -26,7 +25,13 @@ __all__ = [
|
||||
class AllGrantedApplicationsMixin(CommonApiMixin, ListAPIView):
|
||||
only_fields = serializers.ApplicationGrantedSerializer.Meta.only_fields
|
||||
serializer_class = serializers.ApplicationGrantedSerializer
|
||||
filterset_class = ApplicationFilter
|
||||
filterset_fields = {
|
||||
'id': ['exact'],
|
||||
'name': ['exact'],
|
||||
'category': ['exact'],
|
||||
'type': ['exact', 'in'],
|
||||
'comment': ['exact'],
|
||||
}
|
||||
search_fields = ['name', 'comment']
|
||||
user: None
|
||||
|
||||
|
Reference in New Issue
Block a user