diff options
author | Neil Johnson <neil@fragile.org.uk> | 2018-04-11 10:59:00 +0100 |
---|---|---|
committer | Neil Johnson <neil@fragile.org.uk> | 2018-04-11 10:59:00 +0100 |
commit | 427e6c4059e2eff5eacf114dc6708e2972ca36d2 (patch) | |
tree | 608df478fe94531db9a789e3c8d1e827a34d8302 /synapse/storage/registration.py | |
parent | Update README.rst (diff) | |
parent | bump version/changelog (diff) | |
download | synapse-427e6c4059e2eff5eacf114dc6708e2972ca36d2.tar.xz |
Merge branch 'release-v0.27.0' of https://github.com/matrix-org/synapse v0.27.3
Diffstat (limited to 'synapse/storage/registration.py')
-rw-r--r-- | synapse/storage/registration.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/synapse/storage/registration.py b/synapse/storage/registration.py index d809b2ba46..6b557ca0cf 100644 --- a/synapse/storage/registration.py +++ b/synapse/storage/registration.py @@ -460,14 +460,12 @@ class RegistrationStore(RegistrationWorkerStore, """ def _find_next_generated_user_id(txn): txn.execute("SELECT name FROM users") - rows = self.cursor_to_dict(txn) regex = re.compile("^@(\d+):") found = set() - for r in rows: - user_id = r["name"] + for user_id, in txn: match = regex.search(user_id) if match: found.add(int(match.group(1))) |