diff options
| author | Russell Keith-Magee <russell@keith-magee.com> | 2009-11-03 14:02:49 +0000 |
|---|---|---|
| committer | Russell Keith-Magee <russell@keith-magee.com> | 2009-11-03 14:02:49 +0000 |
| commit | 585b7acaa359fc1df07269c1a4b4756bdb6703f7 (patch) | |
| tree | 8fd3d96de629257ee7bb51e757e20b74df6b3f22 /django/core/serializers/python.py | |
| parent | aba5389326372be43b2a3bdcda16646fd197e807 (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.py | 2 |
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()] |
