0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-15 01:23:51 +01:00

Ensure integer is an integer

This commit is contained in:
Erik Johnston 2016-03-09 10:20:48 +00:00
parent ce829c2aef
commit 158a322e82

View file

@ -34,7 +34,7 @@ def _load_max_id(db_conn, table, column):
cur.execute("SELECT MAX(%s) FROM %s" % (column, table,)) cur.execute("SELECT MAX(%s) FROM %s" % (column, table,))
val, = cur.fetchone() val, = cur.fetchone()
cur.close() cur.close()
return val if val else 1 return int(val) if val else 1
class StreamIdGenerator(object): class StreamIdGenerator(object):