From 16928a79e6c6e8b496a999ee3a1e92dbf655c5aa Mon Sep 17 00:00:00 2001 From: Malcolm Tredinnick Date: Fri, 15 Feb 2008 06:40:23 +0000 Subject: [PATCH] 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 --- django/db/models/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/django/db/models/base.py b/django/db/models/base.py index 83b3a435bb..5aa3158fee 100644 --- a/django/db/models/base.py +++ b/django/db/models/base.py @@ -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)