diff options
author | Erik Johnston <erik@matrix.org> | 2014-08-19 14:32:47 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-08-19 14:32:47 +0100 |
commit | 840771190fc11e51ee0810749a99d87186ccb78b (patch) | |
tree | 163e893a2fb68975192c44dd1821afb49dca7939 /synapse | |
parent | Print out stacktrace when we failed to persist event. (diff) | |
download | synapse-840771190fc11e51ee0810749a99d87186ccb78b.tar.xz |
Fix bug where we sometimes set min_token to None.
Diffstat (limited to '')
-rw-r--r-- | synapse/storage/__init__.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/synapse/storage/__init__.py b/synapse/storage/__init__.py index 2243a710db..470b7b7663 100644 --- a/synapse/storage/__init__.py +++ b/synapse/storage/__init__.py @@ -176,7 +176,8 @@ class DataStore(RoomMemberStore, RoomStore, "SELECT MIN(stream_ordering) FROM events" ) - self.min_token = min(row[0][0], -1) if row and row[0] else -1 + self.min_token = row[0][0] if row and row[0] and row[0][0] else -1 + self.min_token = min(self.min_token, -1) logger.debug("min_token is: %s", self.min_token) |