summaryrefslogtreecommitdiffstats
path: root/users/shortcuts.py
diff options
context:
space:
mode:
authorAndrew Godwin2022-11-10 23:42:43 -0700
committerAndrew Godwin2022-11-10 23:42:43 -0700
commitfbfad9fbf5e061cb7c658dada3c4014c9796021c (patch)
tree41cb9c3685e347d506876e18c8e535e3d126f1d9 /users/shortcuts.py
parent2c3a1299709f2612e96c37e4e121c83ad4df7a56 (diff)
downloadtakahe-fbfad9fbf5e061cb7c658dada3c4014c9796021c.tar.gz
takahe-fbfad9fbf5e061cb7c658dada3c4014c9796021c.tar.bz2
takahe-fbfad9fbf5e061cb7c658dada3c4014c9796021c.zip
Inbound and outbound follows basic working
Diffstat (limited to 'users/shortcuts.py')
-rw-r--r--users/shortcuts.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/users/shortcuts.py b/users/shortcuts.py
index 8e20a09..0726218 100644
--- a/users/shortcuts.py
+++ b/users/shortcuts.py
@@ -19,7 +19,10 @@ def by_handle_or_404(request, handle, local=True, fetch=False) -> Identity:
else:
username, domain = handle.split("@", 1)
# Resolve the domain to the display domain
- domain = Domain.get_remote_domain(domain).domain
+ domain_instance = Domain.get_domain(domain)
+ if domain_instance is None:
+ domain_instance = Domain.get_remote_domain(domain)
+ domain = domain_instance.domain
identity = Identity.by_username_and_domain(
username,
domain,