fix Cannot fetch local actor webfinger

Part-of: <https://dev.funkwhale.audio/funkwhale/funkwhale/-/merge_requests/2861>
environments/review-docs-ogg-c-4enk1l/deployments/20417
Petitminion 2025-01-22 13:39:18 +01:00 zatwierdzone przez Marge
rodzic 689c9feb79
commit 187108d495
1 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -81,6 +81,7 @@ class SignatureAuthentication(authentication.BaseAuthentication):
fetch_delay = 24 * 3600 fetch_delay = 24 * 3600
now = timezone.now() now = timezone.now()
last_fetch = actor.domain.nodeinfo_fetch_date last_fetch = actor.domain.nodeinfo_fetch_date
if not actor.domain.is_local:
if not last_fetch or ( if not last_fetch or (
last_fetch < (now - datetime.timedelta(seconds=fetch_delay)) last_fetch < (now - datetime.timedelta(seconds=fetch_delay))
): ):