Skip to content
Snippets Groups Projects
Verified Commit 2f6d3ae1 authored by Eliot Berriot's avatar Eliot Berriot
Browse files

Ensure unicity on actor username and domain

parent 168c4e7d
No related branches found
No related tags found
No related merge requests found
# 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')},
),
]
......@@ -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(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment