summary refs log tree commit diff
path: root/synapse/storage
diff options
context:
space:
mode:
Diffstat (limited to 'synapse/storage')
-rw-r--r--synapse/storage/util/id_generators.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/synapse/storage/util/id_generators.py b/synapse/storage/util/id_generators.py
index af425ba9a4..610ddad423 100644
--- a/synapse/storage/util/id_generators.py
+++ b/synapse/storage/util/id_generators.py
@@ -34,7 +34,7 @@ def _load_max_id(db_conn, table, column):
     cur.execute("SELECT MAX(%s) FROM %s" % (column, table,))
     val, = cur.fetchone()
     cur.close()
-    return val if val else 1
+    return int(val) if val else 1
 
 
 class StreamIdGenerator(object):