mirror of
https://github.com/django/django.git
synced 2025-08-04 10:59:45 +00:00
Fixed #20378 -- regression in GenericRelation on abstract model
When a GenericRelation was defined on abstract model, queries on childs of the abstract model didn't work. The problem was in the way fields and in particular field.rel was copied from models to their children. The regression was likely caused by #19385. Thanks to Gavin Wahl for spotting the regression.
This commit is contained in:
parent
d9d24c4521
commit
c9a96075fa
3 changed files with 30 additions and 1 deletions
|
@ -122,3 +122,12 @@ class Tag(models.Model):
|
|||
|
||||
class Board(models.Model):
|
||||
name = models.CharField(primary_key=True, max_length=15)
|
||||
|
||||
class HasLinks(models.Model):
|
||||
links = generic.GenericRelation(Link)
|
||||
|
||||
class Meta:
|
||||
abstract = True
|
||||
|
||||
class HasLinkThing(HasLinks):
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue