Commit 3c7fa1b6 authored by jym503558564's avatar jym503558564

[Update] 修改小问题

parent f4fc7573
......@@ -268,8 +268,9 @@ class LoginLogExportView(PermissionsMixin, View):
header = [field.verbose_name for field in fields]
login_logs = cache.get(request.GET.get('spm', ''), [])
response = write_content_to_excel(excel_response, login_logs=login_logs,
header=header, fields=fields)
response = write_content_to_excel(
excel_response, login_logs=login_logs, header=header, fields=fields
)
return response
def post(self, request):
......@@ -281,7 +282,8 @@ class LoginLogExportView(PermissionsMixin, View):
login_logs = UserLoginLog.get_login_logs(
date_from=date_from, date_to=date_to, user=user,
keyword=keyword, date_format=self.date_format)
keyword=keyword, date_format=self.date_format
)
except ValueError:
return HttpResponse('Json object not valid', status=400)
spm = uuid.uuid4().hex
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment