mirror of
https://github.com/jumpserver/jumpserver.git
synced 2025-08-31 06:46:24 +00:00
fix: 一些任务查找不到id和执行者
This commit is contained in:
@@ -215,7 +215,8 @@ class Job(JMSOrgBaseModel, PeriodTaskModelMixin):
|
|||||||
return "{}:{}:{}".format(self.org.name, self.creator.name, self.playbook.name)
|
return "{}:{}:{}".format(self.org.name, self.creator.name, self.playbook.name)
|
||||||
|
|
||||||
def create_execution(self):
|
def create_execution(self):
|
||||||
return self.executions.create(job_version=self.version, material=self.material, job_type=Types[self.type].value)
|
return self.executions.create(job_version=self.version, material=self.material, job_type=Types[self.type].value,
|
||||||
|
creator=self.creator)
|
||||||
|
|
||||||
class Meta:
|
class Meta:
|
||||||
verbose_name = _("Job")
|
verbose_name = _("Job")
|
||||||
|
Reference in New Issue
Block a user