Merge pull request #3969 from jumpserver/update-login-logs

[Update] login-logs api 添加 `mfa_display`
pull/3979/head
老广 5 years ago committed by GitHub
commit 363b5d04d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -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