Allow books with no authors

This commit is contained in:
2024-11-26 23:22:37 +01:00
parent 32785f321a
commit 41d9338459
3 changed files with 20 additions and 2 deletions

View File

@@ -40,7 +40,7 @@ class Author(models.Model):
class Book(BaseModel):
title = models.CharField(max_length=200)
authors = models.ManyToManyField(Author)
authors = models.ManyToManyField(Author, blank=True)
publisher = models.ForeignKey(Publisher, on_delete=models.CASCADE)
ISBN = models.CharField(max_length=17, blank=True) # 13 + dashes
language = models.CharField(