fix: 修改审计日志操作日志动作翻译问题

pull/7525/head
Michael Bai 2022-01-18 15:20:29 +08:00 committed by Jiangjie.Bai
parent 518caa4f7a
commit 59d0f53725
1 changed files with 4 additions and 1 deletions

View File

@ -48,11 +48,14 @@ class UserLoginLogSerializer(serializers.ModelSerializer):
class OperateLogSerializer(serializers.ModelSerializer):
action_display = serializers.CharField(source='get_action_display', label=_('Action'))
class Meta:
model = models.OperateLog
fields_mini = ['id']
fields_small = fields_mini + [
'user', 'action', 'resource_type', 'resource_type_display', 'resource',
'user', 'action', 'action_display',
'resource_type', 'resource_type_display', 'resource',
'remote_addr', 'datetime', 'org_id'
]
fields = fields_small