Ensure unicity on actor username and domain

merge-requests/154/head
Eliot Berriot 2018-04-03 18:35:08 +02:00
rodzic 168c4e7d53
commit 2f6d3ae180
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: DD6965E2476E5C27
2 zmienionych plików z 20 dodań i 0 usunięć

Wyświetl plik

@ -0,0 +1,17 @@
# Generated by Django 2.0.3 on 2018-04-03 16:20
from django.db import migrations
class Migration(migrations.Migration):
dependencies = [
('federation', '0001_initial'),
]
operations = [
migrations.AlterUniqueTogether(
name='actor',
unique_together={('domain', 'preferred_username')},
),
]

Wyświetl plik

@ -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(