Fix #642: Race condition searching for unseen users

This commit is contained in:
Andrew Godwin 2023-09-15 10:21:33 -06:00
parent dd532e4425
commit 6c83d7b67b
1 changed files with 35 additions and 33 deletions

View File

@ -394,6 +394,8 @@ class Identity(StatorModel):
domain = domain.domain domain = domain.domain
else: else:
domain = domain.lower() domain = domain.lower()
with transaction.atomic():
try: try:
if local: if local:
return cls.objects.get( return cls.objects.get(