mirror of https://github.com/jumpserver/jumpserver
fix: 个别页面搜索不生效的问题
parent
786cb23f98
commit
40730b741d
|
@ -18,8 +18,8 @@ __all__ = [
|
||||||
|
|
||||||
class AccountBackupPlanViewSet(OrgBulkModelViewSet):
|
class AccountBackupPlanViewSet(OrgBulkModelViewSet):
|
||||||
model = AccountBackupAutomation
|
model = AccountBackupAutomation
|
||||||
filter_fields = ('name',)
|
filterset_fields = ('name',)
|
||||||
search_fields = filter_fields
|
search_fields = filterset_fields
|
||||||
ordering = ('name',)
|
ordering = ('name',)
|
||||||
serializer_class = serializers.AccountBackupSerializer
|
serializer_class = serializers.AccountBackupSerializer
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ __all__ = [
|
||||||
class AutomationAssetsListApi(generics.ListAPIView):
|
class AutomationAssetsListApi(generics.ListAPIView):
|
||||||
model = BaseAutomation
|
model = BaseAutomation
|
||||||
serializer_class = serializers.AutomationAssetsSerializer
|
serializer_class = serializers.AutomationAssetsSerializer
|
||||||
filter_fields = ("name", "address")
|
filterset_fields = ("name", "address")
|
||||||
search_fields = filter_fields
|
search_fields = filterset_fields
|
||||||
|
|
||||||
def get_object(self):
|
def get_object(self):
|
||||||
pk = self.kwargs.get('pk')
|
pk = self.kwargs.get('pk')
|
||||||
|
|
|
@ -24,8 +24,8 @@ __all__ = [
|
||||||
|
|
||||||
class ChangeSecretAutomationViewSet(OrgBulkModelViewSet):
|
class ChangeSecretAutomationViewSet(OrgBulkModelViewSet):
|
||||||
model = ChangeSecretAutomation
|
model = ChangeSecretAutomation
|
||||||
filter_fields = ('name', 'secret_type', 'secret_strategy')
|
filterset_fields = ('name', 'secret_type', 'secret_strategy')
|
||||||
search_fields = filter_fields
|
search_fields = filterset_fields
|
||||||
serializer_class = serializers.ChangeSecretAutomationSerializer
|
serializer_class = serializers.ChangeSecretAutomationSerializer
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ __all__ = [
|
||||||
|
|
||||||
class GatherAccountsAutomationViewSet(OrgBulkModelViewSet):
|
class GatherAccountsAutomationViewSet(OrgBulkModelViewSet):
|
||||||
model = GatherAccountsAutomation
|
model = GatherAccountsAutomation
|
||||||
filter_fields = ('name',)
|
filterset_fields = ('name',)
|
||||||
search_fields = filter_fields
|
search_fields = filterset_fields
|
||||||
serializer_class = serializers.GatherAccountAutomationSerializer
|
serializer_class = serializers.GatherAccountAutomationSerializer
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -20,8 +20,8 @@ __all__ = [
|
||||||
|
|
||||||
class PushAccountAutomationViewSet(OrgBulkModelViewSet):
|
class PushAccountAutomationViewSet(OrgBulkModelViewSet):
|
||||||
model = PushAccountAutomation
|
model = PushAccountAutomation
|
||||||
filter_fields = ('name', 'secret_type', 'secret_strategy')
|
filterset_fields = ('name', 'secret_type', 'secret_strategy')
|
||||||
search_fields = filter_fields
|
search_fields = filterset_fields
|
||||||
serializer_class = serializers.PushAccountAutomationSerializer
|
serializer_class = serializers.PushAccountAutomationSerializer
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue