1
0
mirror of https://github.com/django/django.git synced 2024-12-23 01:25:58 +00:00

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

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)