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

Commit

Permalink
chore: default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Philippe Cote-Boucher committed Sep 18, 2020
1 parent fb93213 commit b9a9cda
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rasa_addons/core/actions/action_botfront_form.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import functools
from typing import Dict, Text, Any, List, Optional
from rasa.core.slots import Slot

from rasa_addons.core.actions.required_slots_graph_parser import (
RequiredSlotsGraphParser,
Expand Down Expand Up @@ -69,7 +70,9 @@ async def run(
) -> List[Event]:
# attempt retrieving spec
if not len(self.form_spec):
for form in tracker.slots.get("bf_forms").initial_value:
for form in tracker.slots.get(
"bf_forms", Slot("bf_forms", initial_value=[])
).initial_value:
if form.get("name") == self.name():
self.form_spec = clean_none_values(form)
if not len(self.form_spec):
Expand Down

0 comments on commit b9a9cda

Please sign in to comment.