From 134522c9d982dddeb0e63f904462aa4ad0ae4bdc Mon Sep 17 00:00:00 2001 From: Heiko Kernbach Date: Wed, 14 Apr 2021 17:02:55 +0200 Subject: [PATCH] fix smart graph creation --- arango/database.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/arango/database.py b/arango/database.py index 78642f42..5b009fb7 100644 --- a/arango/database.py +++ b/arango/database.py @@ -1209,7 +1209,7 @@ def create_graph( 'to_vertex_collections': ['lectures'] } """ - data: Json = {"name": name} + data: Json = {"name": name, "options": dict()} if edge_definitions is not None: data["edgeDefinitions"] = [ { @@ -1224,9 +1224,9 @@ def create_graph( if smart is not None: # pragma: no cover data["isSmart"] = smart if smart_field is not None: # pragma: no cover - data["smartGraphAttribute"] = smart_field + data["options"]["smartGraphAttribute"] = smart_field if shard_count is not None: # pragma: no cover - data["numberOfShards"] = shard_count + data["options"]["numberOfShards"] = shard_count request = Request(method="post", endpoint="/_api/gharial", data=data)