From 3d39f43b4c2b4174f4787a68300fc7f65d704c99 Mon Sep 17 00:00:00 2001 From: Megan Henning Date: Tue, 6 Feb 2018 17:10:26 -0600 Subject: [PATCH] Only update job id on analysis --- api/dao/containerstorage.py | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/api/dao/containerstorage.py b/api/dao/containerstorage.py index 5c221b175..84f67d20a 100644 --- a/api/dao/containerstorage.py +++ b/api/dao/containerstorage.py @@ -404,22 +404,9 @@ def inflate_job_info(self, analysis): if next_job is None: break job = Job.load(next_job) - if job.id_ != str(analysis['job']): + if job.id_ != analysis['job']: # Update analysis if job has changed - # Remove old inputs and replace with new job inputs - # (In practice these should never change) - files = analysis.get('files', []) - files[:] = [x for x in files if x.get('output')] - - for i in getattr(job, 'inputs',{}): - fileref = job.inputs[i] - contref = containerutil.create_containerreference_from_filereference(job.inputs[i]) - file_ = contref.find_file(fileref.name) - if file_: - file_['input'] = True - files.append(file_) - - self.update_el(analysis['_id'], {'job': job.id_, 'files': files}) + self.update_el(analysis['_id'], {'job': job.id_}) analysis['job'] = job return analysis