Merge pull request #217 from mouse-reeve/unique-emails

Make user email addresses unique
This commit is contained in:
Mouse Reeve 2020-10-02 15:50:31 -07:00 committed by GitHub
commit 01aa0a86d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 19 additions and 0 deletions

View file

@ -0,0 +1,18 @@
# Generated by Django 3.0.7 on 2020-10-02 21:56
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('bookwyrm', '0049_passwordreset'),
]
operations = [
migrations.AlterField(
model_name='user',
name='email',
field=models.EmailField(max_length=254, unique=True),
),
]

View file

@ -18,6 +18,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
''' a user who wants to read books '''
private_key = models.TextField(blank=True, null=True)
public_key = models.TextField(blank=True, null=True)
email = models.EmailField(unique=True)
inbox = models.CharField(max_length=255, unique=True)
shared_inbox = models.CharField(max_length=255, blank=True, null=True)
federated_server = models.ForeignKey(