summaryrefslogtreecommitdiff
path: root/django/core/serializers/python.py
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2009-11-03 14:02:49 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2009-11-03 14:02:49 +0000
commit585b7acaa359fc1df07269c1a4b4756bdb6703f7 (patch)
tree8fd3d96de629257ee7bb51e757e20b74df6b3f22 /django/core/serializers/python.py
parentaba5389326372be43b2a3bdcda16646fd197e807 (diff)
Fixed #10109 -- Removed the use of raw SQL in many-to-many fields by introducing an autogenerated through model.
This is the first part of Alex Gaynor's GSoC project to add Multi-db support to Django. git-svn-id: http://code.djangoproject.com/svn/django/trunk@11710 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/serializers/python.py')
-rw-r--r--django/core/serializers/python.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py
index b672e4efc3..7b77804009 100644
--- a/django/core/serializers/python.py
+++ b/django/core/serializers/python.py
@@ -56,7 +56,7 @@ class Serializer(base.Serializer):
self._current[field.name] = smart_unicode(related, strings_only=True)
def handle_m2m_field(self, obj, field):
- if field.creates_table:
+ if field.rel.through._meta.auto_created:
self._current[field.name] = [smart_unicode(related._get_pk_val(), strings_only=True)
for related in getattr(obj, field.name).iterator()]