From bb8c47518f816ed6605c4a10497710f06e567ed0 Mon Sep 17 00:00:00 2001 From: tjoubert Date: Sat, 28 Jan 2023 15:29:39 +0400 Subject: [PATCH 1/2] Fixed code that deserializes body["indexes"] --- arango/formatter.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/arango/formatter.py b/arango/formatter.py index 2801f6d0..08f55498 100644 --- a/arango/formatter.py +++ b/arango/formatter.py @@ -888,9 +888,8 @@ def format_view(body: Json) -> Json: if "links" in body: result["links"] = body["links"] if "indexes" in body: - result["indexes"] = { - name: format_view_index(idx) for name, idx in body["indexes"].items() - } + if len(body["indexes"]) > 0: + result["indexes"] = [ format_view_index(idx) for idx in body["indexes"]] return verify_format(body, result) From f0eb86201f01220b002d0f500393aac4cd91693e Mon Sep 17 00:00:00 2001 From: tjoubert Date: Sat, 28 Jan 2023 15:55:50 +0400 Subject: [PATCH 2/2] Returning the indexes as it is given by the server --- arango/formatter.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/arango/formatter.py b/arango/formatter.py index 08f55498..27f5c172 100644 --- a/arango/formatter.py +++ b/arango/formatter.py @@ -888,8 +888,7 @@ def format_view(body: Json) -> Json: if "links" in body: result["links"] = body["links"] if "indexes" in body: - if len(body["indexes"]) > 0: - result["indexes"] = [ format_view_index(idx) for idx in body["indexes"]] + result["indexes"] = body["indexes"] return verify_format(body, result)