Skip to content

Commit 9212461

Browse files
authored
Merge pull request #165 from hkernbach/bug-fix/smart-graph-creation-and-options
Fix smart graph creation options.
2 parents 17ff464 + 134522c commit 9212461

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

arango/database.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1209,7 +1209,7 @@ def create_graph(
12091209
'to_vertex_collections': ['lectures']
12101210
}
12111211
"""
1212-
data: Json = {"name": name}
1212+
data: Json = {"name": name, "options": dict()}
12131213
if edge_definitions is not None:
12141214
data["edgeDefinitions"] = [
12151215
{
@@ -1224,9 +1224,9 @@ def create_graph(
12241224
if smart is not None: # pragma: no cover
12251225
data["isSmart"] = smart
12261226
if smart_field is not None: # pragma: no cover
1227-
data["smartGraphAttribute"] = smart_field
1227+
data["options"]["smartGraphAttribute"] = smart_field
12281228
if shard_count is not None: # pragma: no cover
1229-
data["numberOfShards"] = shard_count
1229+
data["options"]["numberOfShards"] = shard_count
12301230

12311231
request = Request(method="post", endpoint="/_api/gharial", data=data)
12321232

0 commit comments

Comments
 (0)