Don't use _cursor_to_dict in find_next_generated_user_id_localpart
parent
a052aa42e7
commit
8d6dc106d1
|
@ -460,14 +460,12 @@ class RegistrationStore(RegistrationWorkerStore,
|
||||||
"""
|
"""
|
||||||
def _find_next_generated_user_id(txn):
|
def _find_next_generated_user_id(txn):
|
||||||
txn.execute("SELECT name FROM users")
|
txn.execute("SELECT name FROM users")
|
||||||
rows = self.cursor_to_dict(txn)
|
|
||||||
|
|
||||||
regex = re.compile("^@(\d+):")
|
regex = re.compile("^@(\d+):")
|
||||||
|
|
||||||
found = set()
|
found = set()
|
||||||
|
|
||||||
for r in rows:
|
for user_id, in txn:
|
||||||
user_id = r["name"]
|
|
||||||
match = regex.search(user_id)
|
match = regex.search(user_id)
|
||||||
if match:
|
if match:
|
||||||
found.add(int(match.group(1)))
|
found.add(int(match.group(1)))
|
||||||
|
|
Loading…
Reference in New Issue