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

Correctly increment the _next_id initially

This commit is contained in:
Erik Johnston 2015-04-14 09:54:44 +01:00
parent 86fc9b617c
commit 3c741682e5

View file

@ -55,9 +55,11 @@ class IdGenerator(object):
)
val, = txn.fetchone()
self._next_id = val or 2
cur = val or 0
cur += 1
self._next_id = cur + 1
return 1
return cur
class StreamIdGenerator(object):