Merge pull request #9591 from jumpserver/pr@dev@fix_audit_log_search_field

fix: 修复作业日志页面搜索和时间过滤组件不生效的问题
pull/9592/head
老广 2 years ago committed by GitHub
commit 9af8c629ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -26,7 +26,13 @@ from .serializers import (
class JobAuditViewSet(OrgBulkModelViewSet): class JobAuditViewSet(OrgBulkModelViewSet):
model = JobAuditLog model = JobAuditLog
extra_filter_backends = [DatetimeRangeFilter]
date_range_filter_fields = [
('date_start', ('date_from', 'date_to'))
]
search_fields = ['creator__name', 'material']
serializer_class = JobAuditLogSerializer serializer_class = JobAuditLogSerializer
ordering = ['-date_start']
http_method_names = ('get', 'head', 'options') http_method_names = ('get', 'head', 'options')

Loading…
Cancel
Save