diff options
author | David Baker <dave@matrix.org> | 2015-04-29 17:13:51 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2015-04-29 17:13:51 +0100 |
commit | 12d381bd5da730d9d4fb2aebcc9fb3d83f9456a7 (patch) | |
tree | 78331608b7114bc1ecbc3c82a186aed4175cd073 /synapse/storage/pusher.py | |
parent | Oops, update the contraint too (diff) | |
download | synapse-12d381bd5da730d9d4fb2aebcc9fb3d83f9456a7.tar.xz |
Decode the data json in the storage layer (was moved but this part was missed)
Diffstat (limited to 'synapse/storage/pusher.py')
-rw-r--r-- | synapse/storage/pusher.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/synapse/storage/pusher.py b/synapse/storage/pusher.py index 2582a1da66..feb2870dfe 100644 --- a/synapse/storage/pusher.py +++ b/synapse/storage/pusher.py @@ -21,6 +21,7 @@ from synapse.api.errors import StoreError from syutil.jsonutil import encode_canonical_json import logging +import simplejson as json logger = logging.getLogger(__name__) @@ -48,6 +49,14 @@ class PusherStore(SQLBaseStore): ) rows = yield self._execute_and_decode("get_all_pushers", sql) + for r in rows: + dataJson = r['data'] + r['data'] = None + try: + r['data'] = json.loads(dataJson) + except: + logger.warn("Invalid JSON in data for pusher %d: %s", r['id'], dataJson) + pass defer.returnValue(rows) |