From 8a00c7741af40863efbe834896a5388537fd4c95 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 18 Jan 2021 11:51:38 -0800 Subject: [PATCH] Nullable email --- bookwyrm/migrations/0038_auto_20210118_1951.py | 18 ++++++++++++++++++ bookwyrm/models/user.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 bookwyrm/migrations/0038_auto_20210118_1951.py diff --git a/bookwyrm/migrations/0038_auto_20210118_1951.py b/bookwyrm/migrations/0038_auto_20210118_1951.py new file mode 100644 index 000000000..10ca52959 --- /dev/null +++ b/bookwyrm/migrations/0038_auto_20210118_1951.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.7 on 2021-01-18 19:51 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bookwyrm', '0037_auto_20210118_1900'), + ] + + operations = [ + migrations.AlterField( + model_name='user', + name='email', + field=models.EmailField(max_length=254, null=True, unique=True), + ), + ] diff --git a/bookwyrm/models/user.py b/bookwyrm/models/user.py index fed58306a..3b8270773 100644 --- a/bookwyrm/models/user.py +++ b/bookwyrm/models/user.py @@ -25,7 +25,7 @@ from . import fields, Review class User(OrderedCollectionPageMixin, AbstractUser): ''' a user who wants to read books ''' username = fields.UsernameField() - email = models.EmailField(unique=True) + email = models.EmailField(unique=True, null=True) key_pair = fields.OneToOneField( 'KeyPair',