mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 23:20:37 +00:00
refactor: 重构危险命令告警类型: Warning (#10970)
* refactor: 重构危险命令告警类型: Warning * Update _msg_command_warning.html * Update _msg_command_warning.html * Update command.py * Update django.po * perf: 优化 command acl warning 的代码逻辑 * perf: 优化 command acl warning 的代码逻辑 * perf: 优化 CommandWarningMessage 逻辑 --------- Co-authored-by: fangfang.dong <fangfang.dong@fit2cloud.com> Co-authored-by: Bai <baijiangjie@gmail.com>
This commit is contained in:
@@ -44,7 +44,7 @@ class AbstractSessionCommand(OrgModelMixin):
|
||||
|
||||
@classmethod
|
||||
def get_risk_level_str(cls, risk_level):
|
||||
risk_mapper = dict(cls.RiskLevelChoices.choices)
|
||||
risk_mapper = dict(RiskLevelChoices.choices)
|
||||
return risk_mapper.get(risk_level)
|
||||
|
||||
def to_dict(self):
|
||||
|
Reference in New Issue
Block a user