diff options
author | Matthew Hodgson <matthew@matrix.org> | 2018-09-07 16:47:30 +0100 |
---|---|---|
committer | Matthew Hodgson <matthew@matrix.org> | 2018-09-07 16:47:30 +0100 |
commit | 6020c112d53c310b2554b12774ab4c54c5d23e0e (patch) | |
tree | 904c01147110fac5befc54c661759f10b62a6db0 | |
parent | fix thinkos (diff) | |
download | synapse-6020c112d53c310b2554b12774ab4c54c5d23e0e.tar.xz |
thinko
-rw-r--r-- | synapse/storage/roommember.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/synapse/storage/roommember.py b/synapse/storage/roommember.py index a751ff723a..ef73ff874b 100644 --- a/synapse/storage/roommember.py +++ b/synapse/storage/roommember.py @@ -98,7 +98,8 @@ class RoomMemberWorkerStore(EventsWorkerStore): res = {} for r in txn: summary = res.setdefault(to_ascii(r[1]), {}) - summary['users'].append((to_ascii(r[0]), to_ascii(r[2]))) + users = summary.setdefault('users', []) + users.append((to_ascii(r[0]), to_ascii(r[2]))) sql = ( "SELECT count(*), m.membership FROM room_memberships as m" @@ -112,7 +113,7 @@ class RoomMemberWorkerStore(EventsWorkerStore): txn.execute(sql, (room_id,)) for r in txn: summary = res.setdefault(to_ascii(r[1]), {}) - summary['count'] = r[0] + summary.set('count', r[0]) return res |