Skip to content

Commit

Permalink
check for key when guessing line number. fixes #6937
Browse files Browse the repository at this point in the history
  • Loading branch information
tmbo committed Oct 6, 2020
1 parent 737de34 commit 1d5c0e0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rasa/shared/utils/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ def _line_number_for_path(self, current: Any, path: Text) -> Optional[int]:
head, tail = path, ""

if head:
if isinstance(current, dict):
if isinstance(current, dict) and head in current:
return self._line_number_for_path(current[head], tail) or this_line
elif isinstance(current, list) and head.isdigit():
return self._line_number_for_path(current[int(head)], tail) or this_line
Expand Down

0 comments on commit 1d5c0e0

Please sign in to comment.