diff --git a/docs/en/docs/release-notes.md b/docs/en/docs/release-notes.md index 0155149..8f4941c 100644 --- a/docs/en/docs/release-notes.md +++ b/docs/en/docs/release-notes.md @@ -1,5 +1,11 @@ # Release Notes +## 0.11.1 + +### Fix + +- Running the `.filter(...)` lookups using the ID by parsing to the proper format. + ## 0.11.0 ### Added diff --git a/mongoz/__init__.py b/mongoz/__init__.py index fab8382..54ae11a 100644 --- a/mongoz/__init__.py +++ b/mongoz/__init__.py @@ -1,4 +1,4 @@ -__version__ = "0.11.0" +__version__ = "0.11.1" from .conf import settings from .conf.global_settings import MongozSettings diff --git a/mongoz/core/db/querysets/core/manager.py b/mongoz/core/db/querysets/core/manager.py index 2c76140..8bb51e9 100644 --- a/mongoz/core/db/querysets/core/manager.py +++ b/mongoz/core/db/querysets/core/manager.py @@ -155,7 +155,7 @@ def filter_query(self, exclude: bool = False, **kwargs: Any) -> "Manager": if "__" in key: parts = key.split("__") lookup_operator = parts[-1] - field_name = parts[-2] + field_name = self._find_and_replace_id(parts[-2]) assert ( lookup_operator in settings.filter_operators