[Update] 修改小问题

pull/3365/head
jym503558564 5 years ago
parent f4fc757379
commit 3c7fa1b60b

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

Loading…
Cancel
Save