Fix job data attribute serialization

Since not all job data attributes of a FrozenJob are of type dict we
need to remove the isinstance check and just store the value.

Change-Id: I61ac5c766604fa9c3b8d4a1225b39f1bb17a9f89
This commit is contained in:
Simon Westphahl 2021-11-18 14:07:54 +01:00 committed by James E. Blair
parent a7423a4e2b
commit d5efa36684
1 changed files with 1 additions and 3 deletions

View File

@ -2011,10 +2011,8 @@ class FrozenJob(zkobject.ZKObject):
v = getattr(self, '_' + k)
if isinstance(v, JobData):
v = {'storage': 'offload', 'path': v.getPath(), 'hash': v.hash}
elif isinstance(v, dict):
v = {'storage': 'local', 'data': v}
else:
v = None
v = {'storage': 'local', 'data': v}
data[k] = v
# Use json_dumps to strip any ZuulMark entries