mirror of https://github.com/jumpserver/jumpserver
perf: change secret adjustment
parent
ebfc3b7b38
commit
e995e3b35a
|
@ -192,10 +192,8 @@ class ChangeSecretManager(BasePlaybookManager):
|
||||||
self.send_recorder_mail(recorders)
|
self.send_recorder_mail(recorders)
|
||||||
|
|
||||||
def send_recorder_mail(self, recorders):
|
def send_recorder_mail(self, recorders):
|
||||||
if not recorders:
|
|
||||||
return
|
|
||||||
recipients = self.execution.recipients
|
recipients = self.execution.recipients
|
||||||
if not recipients:
|
if not recorders or not recipients:
|
||||||
return
|
return
|
||||||
recipients = User.objects.filter(id__in=list(recipients))
|
recipients = User.objects.filter(id__in=list(recipients))
|
||||||
|
|
||||||
|
|
|
@ -116,7 +116,7 @@ class BaseAccount(OrgModelMixin):
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def private_key_path(self):
|
def private_key_path(self):
|
||||||
if not self.secret_type != 'ssh_key' or not self.secret:
|
if not self.secret_type != SecretType.ssh_key or not self.secret:
|
||||||
return None
|
return None
|
||||||
project_dir = settings.PROJECT_DIR
|
project_dir = settings.PROJECT_DIR
|
||||||
tmp_dir = os.path.join(project_dir, 'tmp')
|
tmp_dir = os.path.join(project_dir, 'tmp')
|
||||||
|
|
Loading…
Reference in New Issue