summary refs log tree commit diff
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2016-03-09 10:20:48 +0000
committerErik Johnston <erik@matrix.org>2016-03-09 10:20:48 +0000
commit158a322e8274b8ed031a20a00a3700d0798ae1c2 (patch)
tree6130430a4f2498a3b07d773e433858a39d3c33a5
parentReinstate coverage checks for integ tests (diff)
downloadsynapse-158a322e8274b8ed031a20a00a3700d0798ae1c2.tar.xz
Ensure integer is an integer
-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):