mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 14:09:16 +02:00
Logic to refetch remote entities
This commit is contained in:
parent
63b1007596
commit
cdc617be27
23 changed files with 632 additions and 9 deletions
|
@ -121,3 +121,13 @@ def get_domain_query_from_url(domain, url_field="fid"):
|
|||
**{"{}__startswith".format(url_field): "https://{}/".format(domain)}
|
||||
)
|
||||
return query
|
||||
|
||||
|
||||
def is_local(url):
|
||||
if not url:
|
||||
return True
|
||||
|
||||
d = settings.FEDERATION_HOSTNAME
|
||||
return url.startswith("http://{}/".format(d)) or url.startswith(
|
||||
"https://{}/".format(d)
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue