fixed Link Object Header decoding in complex_object_operations.robot

Signed-off-by: anastasia prasolova <anastasia@nspcc.ru>
This commit is contained in:
anastasia prasolova 2022-04-25 13:34:33 +03:00 committed by Anastasia Prasolova
parent 15dd59ddad
commit 95a5a3fda6
2 changed files with 11 additions and 5 deletions

View file

@ -42,8 +42,14 @@ def decode_split_header(data: dict):
'''
try:
data["splitId"] = json_reencode(data["splitId"])
data["lastPart"] = json_reencode(data["lastPart"]["value"])
data["link"] = json_reencode(data["link"]["value"])
data["lastPart"] = (
json_reencode(data["lastPart"]["value"])
if data["lastPart"] else None
)
data["link"] = (
json_reencode(data["link"]["value"])
if data["link"] else None
)
except Exception as exc:
raise ValueError(f"failed to decode JSON output: {exc}") from exc