summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
Diffstat (limited to 'users')
-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: