fix: KeyError while session start

This commit is contained in:
Suraj Shetty 2020-04-07 12:34:23 +05:30
parent 5b95bee018
commit 7b4e2ce728

View file

@ -161,7 +161,7 @@ def make_dict_from_messages(messages, full_dict=None):
# check if msg with context as key exist eg. msg:context
if len(m) > 2 and m[2]:
key = m[1] + ':' + m[2]
if full_dict[key]:
if full_dict.get(key):
out[key] = full_dict[key]
return out