[Update] login-logs api 添加 `mfa_display`

pull/3969/head
xinwen 5 years ago
parent 5d37269a6c
commit dec89ae5ee

@ -17,12 +17,13 @@ class FTPLogSerializer(serializers.ModelSerializer):
class UserLoginLogSerializer(serializers.ModelSerializer):
type_display = serializers.ReadOnlyField(source='get_type_display')
status_display = serializers.ReadOnlyField(source='get_status_display')
mfa_display = serializers.ReadOnlyField(source='get_mfa_display')
class Meta:
model = models.UserLoginLog
fields = (
'username', 'type', 'type_display', 'ip', 'city', 'user_agent',
'mfa', 'reason', 'status', 'status_display', 'datetime'
'mfa', 'reason', 'status', 'status_display', 'datetime', 'mfa_display'
)

Loading…
Cancel
Save