mirror of
https://github.com/django/django.git
synced 2025-10-28 08:06:09 +00:00
Fixed #35241 -- Cached model's full parent list.
co-authored-by: Keryn Knight <keryn@kerynknight.com> co-authored-by: Natalia <124304+nessita@users.noreply.github.com> co-authored-by: David Smith <smithdc@gmail.com> co-authored-by: Paolo Melchiorre <paolo@melchiorre.org>
This commit is contained in:
committed by
Mariusz Felisiak
parent
6e1ece7ed5
commit
73d5eb8084
@@ -788,7 +788,7 @@ class QuerySet(AltersData):
|
||||
# model to detect the inheritance pattern ConcreteGrandParent ->
|
||||
# MultiTableParent -> ProxyChild. Simply checking self.model._meta.proxy
|
||||
# would not identify that case as involving multiple tables.
|
||||
for parent in self.model._meta.get_parent_list():
|
||||
for parent in self.model._meta.all_parents:
|
||||
if parent._meta.concrete_model is not self.model._meta.concrete_model:
|
||||
raise ValueError("Can't bulk create a multi-table inherited model")
|
||||
if not objs:
|
||||
|
||||
Reference in New Issue
Block a user