From 100aea2eb2659bd58406ea88588cb8efede8ad52 Mon Sep 17 00:00:00 2001 From: Patricia Roman Sanchez <58507180+promans718@users.noreply.github.com> Date: Mon, 7 Oct 2024 08:40:35 +0200 Subject: [PATCH] Update toolium/utils/dataset.py Co-authored-by: Pablo Guijarro --- toolium/utils/dataset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toolium/utils/dataset.py b/toolium/utils/dataset.py index 4cda6ca4..35284a14 100644 --- a/toolium/utils/dataset.py +++ b/toolium/utils/dataset.py @@ -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)):