Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion arango/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,5 +120,5 @@ def build_filter_conditions(filters: Json) -> str:
if not filters:
return ""

conditions = [f"doc.{k} == {json.dumps(v)}" for k, v in filters.items()]
conditions = [f"doc.`{k}` == {json.dumps(v)}" for k, v in filters.items()]
return "FILTER " + " AND ".join(conditions)
4 changes: 4 additions & 0 deletions tests/test_document.py
Original file line number Diff line number Diff line change
Expand Up @@ -1236,6 +1236,10 @@ def test_document_find(col, bad_col, docs):
bad_col.find({"val": 1})
assert err.value.error_code in {11, 1228}

# Test find by attribute with a space
col.insert({"foo bar": "baz"})
assert len(list(col.find({"foo bar": "baz"}))) == 1


def test_document_find_near(col, bad_col, docs):
col.import_bulk(docs)
Expand Down