From dec89ae5ee0de919da82a2ad68f58b3f124faf2e Mon Sep 17 00:00:00 2001 From: xinwen Date: Fri, 8 May 2020 10:08:16 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20login-logs=20api=20=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0=20`mfa=5Fdisplay`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/audits/serializers.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/audits/serializers.py b/apps/audits/serializers.py index 797733563..2feaed7fe 100644 --- a/apps/audits/serializers.py +++ b/apps/audits/serializers.py @@ -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' )