diff --git a/synapse/storage/util/id_generators.py b/synapse/storage/util/id_generators.py index af425ba9a..610ddad42 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):