kopia lustrzana https://dev.funkwhale.audio/funkwhale/funkwhale
Ensure unicity on actor username and domain
rodzic
168c4e7d53
commit
2f6d3ae180
|
@ -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')},
|
||||
),
|
||||
]
|
|
@ -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(
|
||||
|
|
Ładowanie…
Reference in New Issue