mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-04-28 03:21:12 +00:00
perf: user filter error
This commit is contained in:
parent
f0c7a7508b
commit
c206f5d09c
@ -14,6 +14,7 @@ from rest_framework.exceptions import ValidationError
|
||||
from rest_framework.fields import SkipField, empty
|
||||
from rest_framework.settings import api_settings
|
||||
from rest_framework.utils import html
|
||||
from rest_framework_bulk.serializers import BulkListSerializer
|
||||
|
||||
from common.db.fields import EncryptMixin
|
||||
from common.serializers.fields import (
|
||||
@ -72,7 +73,6 @@ class BulkSerializerMixin(object):
|
||||
"""
|
||||
|
||||
def to_internal_value(self, data):
|
||||
from rest_framework_bulk import BulkListSerializer
|
||||
|
||||
ret = super(BulkSerializerMixin, self).to_internal_value(data)
|
||||
|
||||
|
@ -52,7 +52,7 @@ class UserFilter(BaseFilterSet):
|
||||
|
||||
if name == 'is_password_expired':
|
||||
key = 'date_password_last_updated'
|
||||
elif name == 'long_time_no_login':
|
||||
elif name == 'is_long_time_no_login':
|
||||
key = 'last_login'
|
||||
else:
|
||||
raise ValueError('Invalid filter name')
|
||||
|
Loading…
Reference in New Issue
Block a user