Actually encode dicts as json in the DB

This commit is contained in:
Erik Johnston 2014-08-14 14:30:25 +01:00
parent cbd5d55222
commit 6d6a1c3454
2 changed files with 4 additions and 3 deletions

View file

@ -288,7 +288,8 @@ class SQLBaseStore(object):
def _parse_event_from_row(self, row_dict):
d = copy.deepcopy({k: v for k, v in row.items() if v})
d.update(json.loads(row["unrecognized_keys"]))
d.update(json.loads(json.loads(row["unrecognized_keys"])))
d["content"] = json.loads(d["content"})
del d["unrecognized_keys"]
return self.event_factory.create_event(