summaryrefslogtreecommitdiffstats
path: root/users
diff options
context:
space:
mode:
authorAndrew Godwin2022-12-15 18:59:04 -0700
committerAndrew Godwin2022-12-15 18:59:04 -0700
commitfaca9224edf82bc84c9b076d262c7d19cc976b03 (patch)
tree6a82cb90b69ad6cdf70cfc4362eb2d15a01147c8 /users
parentc0cd5a55530079a6ba11f65065658b4fd1236a86 (diff)
downloadtakahe-faca9224edf82bc84c9b076d262c7d19cc976b03.tar.gz
takahe-faca9224edf82bc84c9b076d262c7d19cc976b03.tar.bz2
takahe-faca9224edf82bc84c9b076d262c7d19cc976b03.zip
Handle API identities with no name
Diffstat (limited to 'users')
-rw-r--r--users/models/identity.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/users/models/identity.py b/users/models/identity.py
index 7898b4a..4ebf69f 100644
--- a/users/models/identity.py
+++ b/users/models/identity.py
@@ -505,10 +505,10 @@ class Identity(StatorModel):
)
return {
"id": self.pk,
- "username": self.username,
+ "username": self.username or "",
"acct": self.username if self.local else self.handle,
"url": self.absolute_profile_uri(),
- "display_name": self.name,
+ "display_name": self.name or "",
"note": self.summary or "",
"avatar": self.local_icon_url().absolute,
"avatar_static": self.local_icon_url().absolute,