summary refs log tree commit diff
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-05-20 17:58:09 +0100
committerDavid Baker <dave@matrix.org>2016-05-20 17:58:09 +0100
commit18d68bfee40078e4195adc43c93872d4a6facaf8 (patch)
tree69e6e0520a7db5f84ee9198fc7717b3a3ae99767
parentMake deleting push actions more efficient (diff)
downloadsynapse-18d68bfee40078e4195adc43c93872d4a6facaf8.tar.xz
Handle empty events table
-rw-r--r--synapse/storage/event_push_actions.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/synapse/storage/event_push_actions.py b/synapse/storage/event_push_actions.py
index 4425d4bce5..d630a846c9 100644
--- a/synapse/storage/event_push_actions.py
+++ b/synapse/storage/event_push_actions.py
@@ -293,6 +293,9 @@ class EventPushActionsStore(SQLBaseStore):
         txn.execute("SELECT MAX(stream_ordering) FROM events")
         max_stream_ordering = txn.fetchone()[0]
 
+        if max_stream_ordering is None:
+            return 0
+
         range_start = 0
         range_end = max_stream_ordering