Skip to content
This repository has been archived by the owner on Aug 22, 2019. It is now read-only.

In format_bot_output, consider case where data key is present on dict, but None #1386

Merged
merged 1 commit into from
Nov 23, 2018
Merged

In format_bot_output, consider case where data key is present on dict, but None #1386

merged 1 commit into from
Nov 23, 2018

Conversation

m90
Copy link
Contributor

@m90 m90 commented Nov 22, 2018

When passing an event like BotUttered("only a text message") to format_bot_output this will throw as the dict being created will contain a data key, but its value is None. This requires an additional check for this case before proceeding as get might as well return None.

Status (please check what you already did):

  • made PR ready for code review
  • added some tests for the functionality
  • updated the documentation
  • updated the changelog

@m90
Copy link
Contributor Author

m90 commented Nov 22, 2018

Travis fails because of trailing whitespace, but for reasons unknown to me I currently cannot clone from GitHub and had to use the online editor. I will fix that once things are back to normal.

When passing an event like `BotUttered("only a text message")` to
`format_bot_output` this will throw as the dict will contain a `data` key,
but its value is `None`. This requires checking for this case before proceeding.
@akelad akelad merged commit c82d910 into RasaHQ:master Nov 23, 2018
@m90 m90 deleted the fix-format-output branch November 23, 2018 14:26
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants