Tweaked [7098] to follow a more duck-typing approach.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7116 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-02-15 06:40:23 +00:00
parent 1159791cd5
commit 16928a79e6
1 changed files with 3 additions and 1 deletions

View File

@ -41,7 +41,9 @@ class ModelBase(type):
# Build complete list of parents
for base in parents:
if base is not Model:
# Things without _meta aren't functional models, so they're
# uninteresting parents.
if hasattr(base, '_meta'):
new_class._meta.parents.append(base)
new_class._meta.parents.extend(base._meta.parents)