Don't error when retrieving existing user
Happens when a user is not yet fetched but we look them up via a successful webfinger
This commit is contained in:
parent
a351c6b117
commit
bed5c7ffaa
@ -165,6 +165,12 @@ class Identity(StatorModel):
|
|||||||
)
|
)
|
||||||
if handle is None:
|
if handle is None:
|
||||||
return None
|
return None
|
||||||
|
# See if this actually does match an existing actor
|
||||||
|
try:
|
||||||
|
return cls.objects.get(actor_uri=actor_uri)
|
||||||
|
except cls.DoesNotExist:
|
||||||
|
pass
|
||||||
|
# OK, make one
|
||||||
username, domain = handle.split("@")
|
username, domain = handle.split("@")
|
||||||
domain = Domain.get_remote_domain(domain)
|
domain = Domain.get_remote_domain(domain)
|
||||||
return cls.objects.create(
|
return cls.objects.create(
|
||||||
|
Reference in New Issue
Block a user