Fix domain index issue

This commit is contained in:
Andrew Godwin 2023-07-10 10:11:48 -06:00
parent 3f8213f54a
commit 68eea142b1
1 changed files with 3 additions and 0 deletions

View File

@ -108,6 +108,9 @@ class Domain(StatorModel):
root_federation = "/admin/federation/" root_federation = "/admin/federation/"
edit_federation = "/admin/federation/{self.domain}/" edit_federation = "/admin/federation/{self.domain}/"
class Meta:
indexes: list = []
@classmethod @classmethod
def get_remote_domain(cls, domain: str) -> "Domain": def get_remote_domain(cls, domain: str) -> "Domain":
return cls.objects.get_or_create(domain=domain.lower(), local=False)[0] return cls.objects.get_or_create(domain=domain.lower(), local=False)[0]