8000 Fix bug in DialogStateManager (#1919) · cybsafe/botbuilder-python@988c52d · GitHub
[go: up one dir, main page]

Skip to content

Commit 988c52d

Browse files
Fix bug in DialogStateManager (microsoft#1919)
Co-authored-by: tracyboehrer <tracyboehrer@users.noreply.github.com>
1 parent edbe3b1 commit 988c52d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

libraries/botbuilder-dialogs/botbuilder/dialogs/memory/dialog_state_manager.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,10 @@ def try_get_value(
290290
# TODO: HACK to support .First() retrieval on turn.recognized.entities.foo, replace with Expressions once
291291
# expressions ship
292292
first = ".FIRST()"
293-
i_first = path.upper().rindex(first)
293+
try:
294+
i_first = path.upper().rindex(first)
295+
except ValueError:
296+
i_first = -1
294297
if i_first >= 0:
295298
remaining_path = path[i_first + len(first) :]
296299
path = path[0:i_first]

0 commit comments

Comments
 (0)
0