1
0
mirror of https://github.com/ARM-software/workload-automation.git synced 2025-03-14 06:38:36 +00:00

fw/DatabaseOutput: Fix the retrieval of job level artifacts

This commit is contained in:
Marc Bonnici 2019-07-18 14:14:47 +01:00
parent 61e0369d0f
commit 7ecba98c64

View File

@ -930,8 +930,10 @@ class DatabaseOutput(Output):
tables = ['largeobjects', 'artifacts']
joins = [('classifiers', 'classifiers.artifact_oid = artifacts.oid')]
conditions = ['artifacts.{}_oid = \'{}\''.format(self.kind, self.oid),
'artifacts.large_object_uuid = largeobjects.oid',
'artifacts.job_oid IS NULL']
'artifacts.large_object_uuid = largeobjects.oid']
# If retrieving run level artifacts we want those that don't also belong to a job
if self.kind == 'run':
conditions.append('artifacts.job_oid IS NULL')
pod = self._read_db(columns, tables, conditions, joins)
for artifact in pod:
artifact['path'] = str(artifact['path'])