Skip to content

Commit

Permalink
Merge pull request #105 from cloudblue/lite-28450-fix-message-deseria…
Browse files Browse the repository at this point in the history
…lize

Fix Message deserialize for empty task output runtime
  • Loading branch information
bdjilka authored Dec 20, 2023
2 parents 35034d5 + 82a5b9e commit eb62b64
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion connect/eaas/core/proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,8 @@ def deserialize(cls, raw):
raw_data = raw.get('data')

if version == 2:
if 'output' in raw_data and 'runtime' in raw_data['output']:
raw['data']['output']['runtime'] = raw_data['output']['runtime'] or 0.0
return cls(**raw)

if message_type == MessageType.CAPABILITIES:
Expand Down Expand Up @@ -368,7 +370,7 @@ def deserialize(cls, raw):
result=raw_data['result'],
data=raw_data.get('data'),
countdown=raw_data['countdown'],
runtime=raw_data.get('runtime'),
runtime=raw_data.get('runtime', 0.0),
message=raw_data.get('output'),
),
),
Expand Down

0 comments on commit eb62b64

Please sign in to comment.