From 6404f19d3c54a9a8893b8974dad27677f01bac2c Mon Sep 17 00:00:00 2001 From: Petr Zhizhin Date: Thu, 6 Jan 2022 10:33:29 +0300 Subject: [PATCH] Fixed build_encoder bug for repeated string fields --- exonum_client/proofs/encoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exonum_client/proofs/encoder.py b/exonum_client/proofs/encoder.py index d0c1282..8e407a1 100644 --- a/exonum_client/proofs/encoder.py +++ b/exonum_client/proofs/encoder.py @@ -18,7 +18,7 @@ def _visit(entries: Dict[Any, Any]) -> None: for key, value in entries.items(): if isinstance(value, dict): _visit(value) - elif isinstance(value, list) and all(map(lambda x: 0 <= x <= 255, value)): + elif isinstance(value, list) and all(map(lambda x: 0 <= x <= 255 if isinstance(x, int) else False, value)): obj_raw = bytes(value) entries[key] = str(base64.b64encode(obj_raw), "utf-8")