Ensure unicity on actor username and domain

This commit is contained in:
Eliot Berriot 2018-04-03 18:35:08 +02:00
parent 168c4e7d53
commit 2f6d3ae180
No known key found for this signature in database
GPG key ID: DD6965E2476E5C27
2 changed files with 20 additions and 0 deletions

View file

@ -32,6 +32,9 @@ class Actor(models.Model):
default=timezone.now)
manually_approves_followers = models.NullBooleanField(default=None)
class Meta:
unique_together = ['domain', 'preferred_username']
@property
def webfinger_subject(self):
return '{}@{}'.format(