From 585b7acaa359fc1df07269c1a4b4756bdb6703f7 Mon Sep 17 00:00:00 2001 From: Russell Keith-Magee Date: Tue, 3 Nov 2009 14:02:49 +0000 Subject: 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 --- django/core/serializers/python.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'django/core/serializers/python.py') 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()] -- cgit v1.3