1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Refs #28723 -- Fixed stale prefetch_related cache after add/remove.

Regression in 514b2c989a.
This commit is contained in:
Jon Dufresne
2018-02-05 08:02:57 -08:00
committed by Tim Graham
parent 16ee53d7bb
commit 8b21878357
3 changed files with 18 additions and 2 deletions

View File

@@ -86,7 +86,8 @@ class Reader(models.Model):
class BookReview(models.Model):
book = models.ForeignKey(BookWithYear, models.CASCADE)
# Intentionally does not have a related name.
book = models.ForeignKey(BookWithYear, models.CASCADE, null=True)
notes = models.TextField(null=True, blank=True)