Use author name as a deduplication field

I feel iffy about this but openlibrary has hella duplicates
This commit is contained in:
Mouse Reeve 2020-12-20 13:31:11 -08:00
parent 62d3faa797
commit c4b9b82000

View file

@ -21,7 +21,7 @@ class Author(ActivitypubMixin, BookWyrmModel):
# idk probably other keys would be useful here?
born = fields.DateTimeField(blank=True, null=True)
died = fields.DateTimeField(blank=True, null=True)
name = fields.CharField(max_length=255)
name = fields.CharField(max_length=255, deduplication_field=True)
aliases = fields.ArrayField(
models.CharField(max_length=255), blank=True, default=list
)