diff options
author | David Baker <dave@matrix.org> | 2016-05-20 17:58:09 +0100 |
---|---|---|
committer | David Baker <dave@matrix.org> | 2016-05-20 17:58:09 +0100 |
commit | 18d68bfee40078e4195adc43c93872d4a6facaf8 (patch) | |
tree | 69e6e0520a7db5f84ee9198fc7717b3a3ae99767 | |
parent | Make deleting push actions more efficient (diff) | |
download | synapse-18d68bfee40078e4195adc43c93872d4a6facaf8.tar.xz |
Handle empty events table
-rw-r--r-- | synapse/storage/event_push_actions.py | 3 |
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 |