Commit 0b8a22da authored by Floreal Cabanettes's avatar Floreal Cabanettes
Browse files

Fix tool in database

parent 99cd5b89
......@@ -1119,7 +1119,7 @@ class JobManager:
j11.delete_instance()
if self.target is not None:
job = Job.create(id_job=self.id_job, email=self.email, batch_type=self.config.batch_system_type,
date_created=datetime.now(), tool=self.tool.name)
date_created=datetime.now(), tool=self.tool.name if self.tool is not None else None)
job.save()
if not os.path.exists(self.output_dir):
os.mkdir(self.output_dir)
......@@ -1127,7 +1127,8 @@ class JobManager:
thread.start()
else:
job = Job.create(id_job=self.id_job, email=self.email, batch_type=self.config.batch_system_type,
date_created=datetime.now(), tool=self.tool.name, status="fail")
date_created=datetime.now(), tool=self.tool.name if self.tool is not None else None,
status="fail")
job.save()
def set_status_standalone(self, status, error=""):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment