summary refs log tree commit diff
path: root/synapse/storage/push_rule.py
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-01-27 17:22:35 +0000
committerErik Johnston <erik@matrix.org>2016-01-27 17:22:35 +0000
commita955cbfa494be705a0f2eb1d2fb5cd3b8c481b6f (patch)
tree1ef745f393f8c1961da93ad6ad582829e9f1ea5b /synapse/storage/push_rule.py
parentPEP 8 (diff)
parentMerge pull request #533 from matrix-org/rav/hashtest_federation (diff)
downloadsynapse-a955cbfa494be705a0f2eb1d2fb5cd3b8c481b6f.tar.xz
Merge branch 'develop' of github.com:matrix-org/synapse into erikj/setup
Diffstat (limited to 'synapse/storage/push_rule.py')
-rw-r--r--synapse/storage/push_rule.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/push_rule.py b/synapse/storage/push_rule.py
index 1f51c90ee5..f9a48171ba 100644
--- a/synapse/storage/push_rule.py
+++ b/synapse/storage/push_rule.py
@@ -130,7 +130,8 @@ class PushRuleStore(SQLBaseStore):
 
     def _add_push_rule_relative_txn(self, txn, user_id, **kwargs):
         after = kwargs.pop("after", None)
-        relative_to_rule = kwargs.pop("before", after)
+        before = kwargs.pop("before", None)
+        relative_to_rule = before or after
 
         res = self._simple_select_one_txn(
             txn,