Skip to content

Commit

Permalink
fix(backend): 修复轮值列表过滤失效的问题 #3862
Browse files Browse the repository at this point in the history
  • Loading branch information
iSecloud authored and zhangzhw8 committed Apr 8, 2024
1 parent f1a8008 commit a0c3675
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dbm-ui/backend/db_monitor/views/duty_rule.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"""
from django.utils.decorators import method_decorator
from django.utils.translation import ugettext_lazy as _
from django_filters.rest_framework import DjangoFilterBackend
from rest_framework import filters
from rest_framework.decorators import action
from rest_framework.response import Response
Expand Down Expand Up @@ -63,7 +64,7 @@ class MonitorDutyRuleViewSet(viewsets.AuditedModelViewSet):
queryset = DutyRule.objects.all().order_by("-update_at")
serializer_class = DutyRuleSerializer
pagination_class = AuditedLimitOffsetPagination
filter_backends = [filters.SearchFilter]
filter_backends = [filters.SearchFilter, DjangoFilterBackend]
filter_fields = {"db_type": ["exact"], "name": ["exact"]}
search_fields = ["name"]

Expand Down

0 comments on commit a0c3675

Please sign in to comment.