mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-03 17:29:18 +02:00
Resolve "Have an actor for our users"
This commit is contained in:
parent
c335e4d283
commit
6b16a8b963
17 changed files with 308 additions and 9 deletions
|
@ -20,6 +20,11 @@ TYPE_CHOICES = [
|
|||
]
|
||||
|
||||
|
||||
class ActorQuerySet(models.QuerySet):
|
||||
def local(self, include=True):
|
||||
return self.exclude(user__isnull=include)
|
||||
|
||||
|
||||
class Actor(models.Model):
|
||||
ap_type = "Actor"
|
||||
|
||||
|
@ -47,6 +52,8 @@ class Actor(models.Model):
|
|||
related_name="following",
|
||||
)
|
||||
|
||||
objects = ActorQuerySet.as_manager()
|
||||
|
||||
class Meta:
|
||||
unique_together = ["domain", "preferred_username"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue