Skip to content

Commit

Permalink
Do the ActionExecutionRejection independent if user rejected manually
Browse files Browse the repository at this point in the history
Fix for issue #7751 to avoid that a form will re-ask for the slot prior to switching to another form.
  • Loading branch information
ArjaanBuijk committed Jan 21, 2021
1 parent 2371d80 commit 7de47da
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions rasa/core/actions/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -461,14 +461,7 @@ async def validate(
# to be filled by the user.
if isinstance(event, SlotSet) and not event.key == REQUESTED_SLOT
)
user_rejected_manually = any(
isinstance(event, ActionExecutionRejected) for event in validation_events
)
if (
slot_to_fill
and not some_slots_were_validated
and not user_rejected_manually
):
if slot_to_fill and not some_slots_were_validated:
# reject to execute the form action
# if some slot was requested but nothing was extracted
# it will allow other policies to predict another action
Expand Down

0 comments on commit 7de47da

Please sign in to comment.