Browse Source

perf: 修改 CommandFilterACL, CommandGroup __str__

pull/9155/head
Bai 2 years ago
parent
commit
0cfcfacb6d
  1. 5
      apps/acls/models/command_acl.py

5
apps/acls/models/command_acl.py

@ -91,7 +91,7 @@ class CommandGroup(JMSOrgBaseModel):
return True, '', pattern
def __str__(self):
return '{} % {}'.format(self.type, self.content)
return '{} % {}'.format(self.name, self.type)
class CommandFilterACLQuerySet(UserAssetAccountACLQuerySet):
@ -113,6 +113,9 @@ class CommandFilterACL(UserAssetAccountBaseACL):
ordering = ('priority', '-date_updated', 'name')
verbose_name = _('Command acl')
def __str__(self):
return self.name
def create_command_confirm_ticket(self, run_command, session, cmd_filter_rule, org_id):
from tickets.const import TicketType
from tickets.models import ApplyCommandTicket

Loading…
Cancel
Save