From 63519ec076a5ab478def9cb052857576e170bf75 Mon Sep 17 00:00:00 2001 From: Bai Date: Tue, 14 Apr 2020 12:51:13 +0800 Subject: [PATCH] =?UTF-8?q?[Update]=20=E4=BF=AE=E6=94=B9=E5=91=BD=E4=BB=A4?= =?UTF-8?q?=E8=AE=B0=E5=BD=95/=E6=93=8D=E4=BD=9C/=E6=94=B9=E5=AF=86?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=90=9C=E7=B4=A2=E5=AD=97=E6=AE=B5=E6=B2=A1?= =?UTF-8?q?=E6=B8=85=E7=A9=BA=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/audits/views.py | 6 +++--- apps/ops/templates/ops/command_execution_list.html | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/apps/audits/views.py b/apps/audits/views.py index 9e11ddabc..6ac0b1b99 100644 --- a/apps/audits/views.py +++ b/apps/audits/views.py @@ -120,7 +120,7 @@ class OperateLogListView(PermissionsMixin, DatetimeSearchMixin, ListView): def get_context_data(self, **kwargs): context = { - 'user_list': current_org.get_org_members(), + 'user_list': [str(user) for user in current_org.get_org_members()], 'actions': self.actions_dict, 'search_action': self.action, 'resource_type_list': get_resource_type_list(), @@ -161,7 +161,7 @@ class PasswordChangeLogList(PermissionsMixin, DatetimeSearchMixin, ListView): def get_context_data(self, **kwargs): context = { - 'user_list': current_org.get_org_members(), + 'user_list': [str(user) for user in current_org.get_org_members()], 'date_from': self.date_from, 'date_to': self.date_to, 'user': self.user, @@ -246,7 +246,7 @@ class CommandExecutionListView(UserCommandExecutionListView): 'action': _('Command execution log'), 'date_from': self.date_from, 'date_to': self.date_to, - 'user_list': self.get_user_list(), + 'user_list': [(str(user.id), user) for user in self.get_user_list()], 'keyword': self.keyword, 'user_id': self.user_id, }) diff --git a/apps/ops/templates/ops/command_execution_list.html b/apps/ops/templates/ops/command_execution_list.html index 29cd16c21..a21a1b108 100644 --- a/apps/ops/templates/ops/command_execution_list.html +++ b/apps/ops/templates/ops/command_execution_list.html @@ -39,8 +39,8 @@