fix follow in relationship json (#339)

This commit is contained in:
Cosmin Stejerean 2022-12-31 19:17:05 -08:00 committed by GitHub
parent b522f43ffc
commit 6028232d3d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -73,7 +73,7 @@ class IdentityService:
target=from_identity, target=from_identity,
state__in=FollowStates.group_active(), state__in=FollowStates.group_active(),
).exists(), ).exists(),
"showing_reblogs": follow.boosts, "showing_reblogs": follow and follow.boosts or False,
"notifying": False, "notifying": False,
"blocking": False, "blocking": False,
"blocked_by": False, "blocked_by": False,
@ -82,7 +82,7 @@ class IdentityService:
"requested": False, "requested": False,
"domain_blocking": False, "domain_blocking": False,
"endorsed": False, "endorsed": False,
"note": follow.note or "", "note": (follow and follow.note) or "",
} }
def set_summary(self, summary: str): def set_summary(self, summary: str):