1
0
mirror of https://github.com/django/django.git synced 2025-10-23 21:59:11 +00:00

Fixed #27846 -- Made Model.refresh_from_db() clear cached relations.

This commit is contained in:
Paulo
2017-09-19 12:51:19 -05:00
committed by Tim Graham
parent df0aebc893
commit a7b5ad8b19
3 changed files with 22 additions and 1 deletions

View File

@@ -17,6 +17,10 @@ class Article(models.Model):
return self.headline
class FeaturedArticle(models.Model):
article = models.OneToOneField(Article, models.CASCADE, related_name='featured')
class ArticleSelectOnSave(Article):
class Meta:
proxy = True