Merge pull request #413 from mouse-reeve/author-name-dedup

Use author name as a deduplication field
This commit is contained in:
Mouse Reeve 2020-12-21 11:50:54 -08:00 committed by GitHub
commit 7081c0bb00
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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
)