mirror of
https://github.com/django/django.git
synced 2025-10-05 00:00:37 +00:00
Fixed #14896 -- Ensured that _meta.get_all_related_objects(include_hidden=True) also works correctly with model inheritance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15248 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
f399f8bd71
commit
e01cb07404
3 changed files with 37 additions and 17 deletions
|
@ -371,7 +371,7 @@ class Options(object):
|
|||
cache = SortedDict()
|
||||
parent_list = self.get_parent_list()
|
||||
for parent in self.parents:
|
||||
for obj, model in parent._meta.get_all_related_objects_with_model():
|
||||
for obj, model in parent._meta.get_all_related_objects_with_model(include_hidden=True):
|
||||
if (obj.field.creation_counter < 0 or obj.field.rel.parent_link) and obj.model not in parent_list:
|
||||
continue
|
||||
if not model:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue