Skip to content
This repository was archived by the owner on Apr 28, 2021. It is now read-only.

Commit 8190896

Browse files
authored
fix: form submission
previously exiting form with no SlotSet instruction caused a TypeError
1 parent 3cf9190 commit 8190896

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

rasa_addons/core/actions/action_botfront_form.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,13 +112,12 @@ async def prepare_submit_and_submit():
112112
# deactivate the form after submission
113113
events.extend(self.deactivate())
114114

115-
if len(next_slot_events) == 1 and type(next_slot_events[0]) is SlotSet:
116-
# we only want to set a slot so we can submit
117-
events.extend(next_slot_events)
118-
await prepare_submit_and_submit()
119115
if next_slot_events is not None:
120116
# request next slot
121117
events.extend(next_slot_events)
118+
if len(next_slot_events) == 1 and type(next_slot_events[0]) is SlotSet:
119+
# we only want to set a slot so we can submit
120+
await prepare_submit_and_submit()
122121
else:
123122
# there is nothing more to request, so we can submit
124123
await prepare_submit_and_submit()

0 commit comments

Comments
 (0)