File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -1992,15 +1992,16 @@ def import_bulk(
1992
1992
IMPORTANT NOTE: this parameter may go through breaking changes
1993
1993
in the future where the return type may not be a list of result
1994
1994
objects anymore. Use it at your own risk, and avoid
1995
- depending on the return value if possible. Should not be used
1996
- if **overwrite** is set to true .
1995
+ depending on the return value if possible. Cannot be used with
1996
+ parameter **overwrite**.
1997
1997
:type batch_size: int
1998
1998
:return: Result of the bulk import.
1999
1999
:rtype: dict | list[dict]
2000
2000
:raise arango.exceptions.DocumentInsertError: If import fails.
2001
2001
"""
2002
- if overwrite and batch_size :
2003
- raise ValueError ("Cannot set **batch_size** if **overwrite** is true" )
2002
+ if overwrite and batch_size is not None :
2003
+ msg = "Cannot use parameter 'batch_size' if 'overwrite' is set to True"
2004
+ raise ValueError (msg )
2004
2005
2005
2006
documents = [self ._ensure_key_from_id (doc ) for doc in documents ]
2006
2007
You can’t perform that action at this time.
0 commit comments