summaryrefslogtreecommitdiffstats
path: root/users/models
diff options
context:
space:
mode:
authorAndrew Godwin2022-12-04 21:13:33 -0700
committerAndrew Godwin2022-12-04 21:13:33 -0700
commit93ccb5dd32f4e3942d08814e5a86fb30c90c9ff6 (patch)
tree001b4b4ab9270b007aa90bb4218836b1ef072d84 /users/models
parent28ac03c42fb82db5f1dad1f711cffdde0a0cce6c (diff)
downloadtakahe-93ccb5dd32f4e3942d08814e5a86fb30c90c9ff6.tar.gz
takahe-93ccb5dd32f4e3942d08814e5a86fb30c90c9ff6.tar.bz2
takahe-93ccb5dd32f4e3942d08814e5a86fb30c90c9ff6.zip
Make search work with URLs
Diffstat (limited to 'users/models')
-rw-r--r--users/models/identity.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/users/models/identity.py b/users/models/identity.py
index c435713..bbedceb 100644
--- a/users/models/identity.py
+++ b/users/models/identity.py
@@ -241,9 +241,11 @@ class Identity(StatorModel):
@property
def handle(self):
+ if self.username is None:
+ return "(unknown user)"
if self.domain_id:
return f"{self.username}@{self.domain_id}"
- return f"{self.username}@unknown.invalid"
+ return f"{self.username}@(unknown server)"
@property
def data_age(self) -> float: