This is an automated email from the ASF dual-hosted git repository. rahulvats pushed a commit to branch py-client-sync in repository https://gitbox.apache.org/repos/asf/airflow.git
commit f7b3933ac13e7935d30f7975951378c07c3db30e Author: Elad Kalif <[email protected]> AuthorDate: Tue Mar 24 18:02:33 2026 +0200 Remove self parameter from resolve_nested (#64146) --- .../src/airflow/providers/elasticsearch/log/es_response.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py b/providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py index 2af39ce7364..fc14e971e68 100644 --- a/providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py +++ b/providers/elasticsearch/src/airflow/providers/elasticsearch/log/es_response.py @@ -26,7 +26,7 @@ def _wrap(val): return val -def resolve_nested(self, hit: dict[Any, Any], parent_class=None) -> type[Hit]: +def resolve_nested(hit: dict[Any, Any], parent_class=None) -> type[Hit]: """ Resolve nested hits from Elasticsearch by iteratively navigating the `_nested` field. @@ -35,8 +35,6 @@ def resolve_nested(self, hit: dict[Any, Any], parent_class=None) -> type[Hit]: This method can be used with nested Elasticsearch fields which are structured as dictionaries with "field" and "_nested" keys. """ - doc_class = Hit - nested_path: list[str] = [] nesting = hit["_nested"] while nesting and "field" in nesting: @@ -46,11 +44,10 @@ def resolve_nested(self, hit: dict[Any, Any], parent_class=None) -> type[Hit]: if hasattr(parent_class, "_index"): nested_field = parent_class._index.resolve_field(nested_path_str) + if nested_field is not None: + return nested_field._doc_class - if nested_field is not None: - return nested_field._doc_class - - return doc_class + return Hit class AttributeList:
