Skip to content

Commit

Permalink
Auto-generated API code
Browse files Browse the repository at this point in the history
  • Loading branch information
elasticmachine committed Apr 6, 2023
1 parent 81b3611 commit b1bdf30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion elasticsearch/_async/client/logstash.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ async def get_pipeline(
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path = f"/_logstash/pipeline/{_quote(id)}"
if id not in SKIP_IN_PATH:
__path = f"/_logstash/pipeline/{_quote(id)}"
else:
__path = "/_logstash/pipeline"
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
__query["error_trace"] = error_trace
Expand Down
5 changes: 4 additions & 1 deletion elasticsearch/_sync/client/logstash.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,10 @@ def get_pipeline(
"""
if id in SKIP_IN_PATH:
raise ValueError("Empty value passed for parameter 'id'")
__path = f"/_logstash/pipeline/{_quote(id)}"
if id not in SKIP_IN_PATH:
__path = f"/_logstash/pipeline/{_quote(id)}"
else:
__path = "/_logstash/pipeline"
__query: t.Dict[str, t.Any] = {}
if error_trace is not None:
__query["error_trace"] = error_trace
Expand Down

0 comments on commit b1bdf30

Please sign in to comment.