Skip to content

Commit

Permalink
Update toolium/utils/dataset.py
Browse files Browse the repository at this point in the history
Co-authored-by: Pablo Guijarro <[email protected]>
  • Loading branch information
promans718 and pabloge authored Oct 7, 2024
1 parent 87e2bc3 commit 100aea2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion toolium/utils/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,7 +646,7 @@ def get_value_from_context(param, context):
if isinstance(value, dict) and part in value:
value = value[part]
# evaluate if in an array, access is requested by index
elif isinstance(value, list) and part.lstrip('-+').isdigit() and int(part) < len(value):
elif isinstance(value, list) and part.lstrip('-+').isdigit() and int(part) <= len(value):
value = value[int(part)]
# or by a key=value expression
elif isinstance(value, list) and (element := _select_element_in_list(value, part)):
Expand Down

0 comments on commit 100aea2

Please sign in to comment.