diff --git a/forum/backends/mongodb/contents.py b/forum/backends/mongodb/contents.py index 99d5c264..489ccd2a 100644 --- a/forum/backends/mongodb/contents.py +++ b/forum/backends/mongodb/contents.py @@ -101,7 +101,8 @@ def override_query(self, query: dict[str, Any]) -> dict[str, Any]: """ Override the query with the _type field. """ - query = {**query, "_type": self.content_type} + if self.content_type: + query = {**query, "_type": self.content_type} return super().override_query(query) def get_list(self, **kwargs: Any) -> Cursor[dict[str, Any]]: