Skip to content

Commit

Permalink
[8.0] Skip '$body' key when fetching response attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
V1NAY8 authored and sethmlarson committed Jan 14, 2022
1 parent aad778f commit bf22f96
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ isort
black
twine
build
nox

# No wheels for Python 3.10 yet!
numpy; python_version<"3.10"
Expand Down
4 changes: 3 additions & 1 deletion test_elasticsearch/test_server/test_rest_api_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,9 +467,11 @@ def _lookup(self, path):
for step in path.split("."):
if not step:
continue
# We check body again to handle E.g. '$body.$backing_index.data_stream'
if step.startswith("$body"):
continue
step = step.replace("\1", ".")
step = self._resolve(step)

if (
isinstance(step, string_types)
and step.isdigit()
Expand Down

0 comments on commit bf22f96

Please sign in to comment.