summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-04-13 02:59:40 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-04-13 02:59:40 +0000
commit0fec0a5d704d487755209115719ca173913a43b7 (patch)
tree9c7194d1857cfa26e0ee195f03132abcea4f844e /django
parentffd7b177c9eea9cfe131bc20a98448345436d67e (diff)
Fixed #10237 -- Corrected the handling of self-referential m2m fields when using multi-table inheritance. Thanks to Justin Lilly for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@10550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/db/models/fields/related.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 1d083cd987..f2723a18c7 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -582,7 +582,7 @@ class ReverseManyRelatedObjectsDescriptor(object):
model=rel_model,
core_filters={'%s__pk' % self.field.related_query_name(): instance._get_pk_val()},
instance=instance,
- symmetrical=(self.field.rel.symmetrical and instance.__class__ == rel_model),
+ symmetrical=(self.field.rel.symmetrical and isinstance(instance, rel_model)),
join_table=qn(self.field.m2m_db_table()),
source_col_name=qn(self.field.m2m_column_name()),
target_col_name=qn(self.field.m2m_reverse_name())