From 49900b9c0933c2ef876d96fd426ff5b7600f5fb9 Mon Sep 17 00:00:00 2001 From: Gunther Cox Date: Sat, 24 Jun 2017 09:30:54 -0400 Subject: [PATCH] Correct cast to dict --- chatterbot/storage/sql_storage.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/chatterbot/storage/sql_storage.py b/chatterbot/storage/sql_storage.py index 227b972c6..c47872f94 100644 --- a/chatterbot/storage/sql_storage.py +++ b/chatterbot/storage/sql_storage.py @@ -229,9 +229,11 @@ def update(self, statement): if statement.text: record.text = statement.text if statement.extra_data: - record.extra_data = dict[statement.extra_data] + record.extra_data = dict(statement.extra_data) if statement.in_response_to: - record.in_response_to = list(map(get_response_table, statement.in_response_to)) + record.in_response_to = list( + map(get_response_table, statement.in_response_to) + ) session.add(record) else: session.add(get_statement_table(statement))