fix: Local instance is always reachable to itself

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2321>
This commit is contained in:
Georg Krause 2023-01-19 08:25:24 +01:00 committed by Marge
commit 934e179d59
2 changed files with 9 additions and 2 deletions

View file

@ -1173,7 +1173,9 @@ class LibraryQuerySet(models.QuerySet):
)
.values_list("target__channel__library", flat=True)
)
domains_reachable = federation_models.Domain.objects.filter(reachable=True)
domains_reachable = federation_models.Domain.objects.filter(
reachable=True
) | federation_models.Domain.objects.filter(name=settings.FUNKWHALE_HOSTNAME)
return self.filter(
me_query