diff --git a/bookwyrm/migrations/0013_book_origin_id.py b/bookwyrm/migrations/0013_book_origin_id.py new file mode 100644 index 000000000..581a2406e --- /dev/null +++ b/bookwyrm/migrations/0013_book_origin_id.py @@ -0,0 +1,18 @@ +# Generated by Django 3.0.7 on 2020-11-24 21:42 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('bookwyrm', '0012_attachment'), + ] + + operations = [ + migrations.AlterField( + model_name='book', + name='origin_id', + field=models.CharField(blank=True, max_length=255, null=True), + ), + ] diff --git a/bookwyrm/models/book.py b/bookwyrm/models/book.py index 6edfece80..c8643f07e 100644 --- a/bookwyrm/models/book.py +++ b/bookwyrm/models/book.py @@ -16,7 +16,7 @@ from .base_model import image_attachments_formatter class Book(ActivitypubMixin, BookWyrmModel): ''' a generic book, which can mean either an edition or a work ''' - origin_id = models.CharField(max_length=255, null=True) + origin_id = models.CharField(max_length=255, null=True, blank=True) # these identifiers apply to both works and editions openlibrary_key = models.CharField(max_length=255, blank=True, null=True) librarything_key = models.CharField(max_length=255, blank=True, null=True) diff --git a/bookwyrm/templates/edit_book.html b/bookwyrm/templates/edit_book.html index bd89ac0a9..54cefb0a7 100644 --- a/bookwyrm/templates/edit_book.html +++ b/bookwyrm/templates/edit_book.html @@ -20,6 +20,12 @@ +{% if login_form.non_field_errors %} +
{{ login_form.non_field_errors }}
+