Fix Alexa bug if no value for slots

This commit is contained in:
Paulus Schoutsen 2015-12-22 02:08:46 -08:00
parent bc4ab4d70a
commit 9876a2a081
2 changed files with 40 additions and 1 deletions

View file

@ -116,7 +116,7 @@ class AlexaResponse(object):
self.should_end_session = True
if intent is not None and 'slots' in intent:
self.variables = {key: value['value'] for key, value
in intent['slots'].items()}
in intent['slots'].items() if 'value' in value}
else:
self.variables = {}