1
0
mirror of https://github.com/django/django.git synced 2025-10-24 22:26:08 +00:00

Fixed #11560 -- Allowed proxy model multiple-inheritance from the same concrete base model.

This commit is contained in:
Akshesh
2016-03-28 00:50:54 +05:30
committed by Tim Graham
parent 2e0cd26ffb
commit 49f95cc0a0
5 changed files with 29 additions and 8 deletions

View File

@@ -177,10 +177,10 @@ class ModelBase(type):
)
else:
continue
if base is not None:
raise TypeError("Proxy model '%s' has more than one non-abstract model base class." % name)
else:
if base is None:
base = parent
elif parent._meta.concrete_model is not base._meta.concrete_model:
raise TypeError("Proxy model '%s' has more than one non-abstract model base class." % name)
if base is None:
raise TypeError("Proxy model '%s' has no non-abstract model base class." % name)
new_class._meta.setup_proxy(base)