Skip to content
Snippets Groups Projects
Commit f8f14ba4 authored by Erik Johnston's avatar Erik Johnston
Browse files

Don't construct a set

parent ba110a20
No related branches found
No related tags found
No related merge requests found
...@@ -492,17 +492,14 @@ class RegistrationWorkerStore(SQLBaseStore): ...@@ -492,17 +492,14 @@ class RegistrationWorkerStore(SQLBaseStore):
regex = re.compile(r"^@(\d+):") regex = re.compile(r"^@(\d+):")
found = set() max_found = 0
for (user_id,) in txn: for (user_id,) in txn:
match = regex.search(user_id) match = regex.search(user_id)
if match: if match:
found.add(int(match.group(1))) max_found = max(int(match.group(1)), max_found)
if not found: return max_found + 1
return 1
return max(found) + 1
return ( return (
( (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment