Skip to content

Commit 58b9319

Browse files
committed
Adjust for django_three_two
1 parent eaeacf8 commit 58b9319

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

models.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,10 @@ def contributors_citation(self):
531531

532532

533533
class KeywordBook(models.Model):
534-
keyword = models.ForeignKey("submission.Keyword")
534+
keyword = models.ForeignKey(
535+
"submission.Keyword",
536+
on_delete=models.CASCADE,
537+
)
535538
book = models.ForeignKey("books.Book")
536539
order = models.PositiveIntegerField(default=1)
537540

@@ -547,8 +550,14 @@ def __repr__(self):
547550

548551

549552
class KeywordChapter(models.Model):
550-
keyword = models.ForeignKey("submission.Keyword")
551-
chapter = models.ForeignKey("books.Chapter")
553+
keyword = models.ForeignKey(
554+
"submission.Keyword",
555+
on_delete=models.CASCADE,
556+
)
557+
chapter = models.ForeignKey(
558+
"books.Chapter",
559+
on_delete=models.CASCADE,
560+
)
552561
order = models.PositiveIntegerField(default=1)
553562

554563
class Meta:

0 commit comments

Comments
 (0)