diff options
| author | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-16 06:57:52 +0000 |
|---|---|---|
| committer | Malcolm Tredinnick <malcolm.tredinnick@gmail.com> | 2008-02-16 06:57:52 +0000 |
| commit | 2d0588548e52c78e5213d262a5c4e5df1da3450e (patch) | |
| tree | 3b317c630ea29b42a67b11e26d3599962f1a593b /django/db/models/base.py | |
| parent | 770d587314fb0275f0570b05ee5bc746c2b2c685 (diff) | |
queryset-refactor: Merged from trunk up to [7122].
git-svn-id: http://code.djangoproject.com/svn/django/branches/queryset-refactor@7124 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/db/models/base.py')
| -rw-r--r-- | django/db/models/base.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/django/db/models/base.py b/django/db/models/base.py index c04a6affb7..9236207f94 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) @@ -139,7 +141,7 @@ class Model(object): # There is a rather weird disparity here; if kwargs, it's set, then args # overrides it. It should be one or the other; don't duplicate the work # The reason for the kwargs check is that standard iterator passes in by - # args, and nstantiation for iteration is 33% faster. + # args, and instantiation for iteration is 33% faster. args_len = len(args) if args_len > len(self._meta.fields): # Daft, but matches old exception sans the err msg. |
