From 73ef8ac6eb9059d439e1dcfc243f206739eb2ed1 Mon Sep 17 00:00:00 2001 From: Brandon Wolfe Date: Thu, 3 Dec 2020 16:19:17 -0600 Subject: [PATCH] Fix for empty list validation --- src/Zoomba/APILibrary.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Zoomba/APILibrary.py b/src/Zoomba/APILibrary.py index c245a474..2e6e44f2 100644 --- a/src/Zoomba/APILibrary.py +++ b/src/Zoomba/APILibrary.py @@ -361,7 +361,10 @@ def _key_by_key_list(self, key, value, actual_dictionary, unmatched_keys_list=No "\nActual: " + str(actual_dictionary[key])) continue else: - actual_item = actual_dictionary[key][index] + if len(actual_dictionary[key]) == 0: + actual_item = '' + else: + actual_item = actual_dictionary[key][index] temp_actual_dict = {key: actual_item} temp_expected_dict = {key: item} if unmatched_keys_list: