Skip to content

Commit

Permalink
codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
davidesner committed May 31, 2024
1 parent 95f098a commit 8873b41
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python-sync-actions/src/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,15 +276,15 @@ def find_array_property_path(response_data: dict, result_arrays: list = None) ->
value = value[key]
result = value
except KeyError:
return [f"Path {path.path} not found in the response data"]
result = [f"Path {path.path} not found in the response data"]

# TODO: check if the result is list
if result is None:
return [f"No suitable array element found in the response data, please define the Data Selector path."]
result = ["No suitable array element found in the response data, please define the Data Selector path."]
if not isinstance(result, list):
element_name = 'root' if path.path == '.' else path.path
return [f"The {element_name} element of the response is not a list, "
f"please change your Data Selector path to list"]
result = [f"The {element_name} element of the response is not a list, "
f"please change your Data Selector path to list"]

return result

Expand Down

0 comments on commit 8873b41

Please sign in to comment.