Change fix

This commit is contained in:
Erik Johnston 2016-05-31 15:44:08 +01:00
parent 4efa389299
commit cca0093fa9
2 changed files with 8 additions and 5 deletions

View File

@ -132,9 +132,6 @@ class PushRuleRestServlet(ClientV1RestServlet):
enabled_map = yield self.store.get_push_rules_enabled_for_user(user_id) enabled_map = yield self.store.get_push_rules_enabled_for_user(user_id)
rawrules = {k: v for k, v in rawrules.item() if k is not None}
enabled_map = {k: v for k, v in enabled_map.item() if k is not None}
rules = format_push_rules_for_user(requester.user, rawrules, enabled_map) rules = format_push_rules_for_user(requester.user, rawrules, enabled_map)
path = request.postpath[1:] path = request.postpath[1:]

View File

@ -66,7 +66,10 @@ class PushRuleStore(SQLBaseStore):
if not user_ids: if not user_ids:
defer.returnValue({}) defer.returnValue({})
results = {} results = {
user_id: []
for user_id in user_ids
}
rows = yield self._simple_select_many_batch( rows = yield self._simple_select_many_batch(
table="push_rules", table="push_rules",
@ -90,7 +93,10 @@ class PushRuleStore(SQLBaseStore):
if not user_ids: if not user_ids:
defer.returnValue({}) defer.returnValue({})
results = {} results = {
user_id: []
for user_id in user_ids
}
rows = yield self._simple_select_many_batch( rows = yield self._simple_select_many_batch(
table="push_rules_enable", table="push_rules_enable",