Logic to refetch remote entities

This commit is contained in:
Eliot Berriot 2019-04-18 14:37:17 +02:00
commit cdc617be27
23 changed files with 632 additions and 9 deletions

View file

@ -117,13 +117,7 @@ class APIModelMixin(models.Model):
@property
def is_local(self):
if not self.fid:
return True
d = settings.FEDERATION_HOSTNAME
return self.fid.startswith("http://{}/".format(d)) or self.fid.startswith(
"https://{}/".format(d)
)
return federation_utils.is_local(self.fid)
@property
def domain_name(self):