Commit f9ead3fe authored by Russell Keith-Magee's avatar Russell Keith-Magee
Browse files

Fixed #12143 -- Corrected the naming of the 'to' column in recursive m2m...

Fixed #12143 -- Corrected the naming of the 'to' column in recursive m2m models. Thanks to knutin@gmail.com for the report, and Alex Gaynor for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@11713 bcc190cf-cafb-0310-a4f2-bffc1f526a37
parent dab3e97c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -819,7 +819,7 @@ def create_many_to_many_intermediary_model(field, klass):
    name = '%s_%s' % (klass._meta.object_name, field.name)
    if field.rel.to == RECURSIVE_RELATIONSHIP_CONSTANT or field.rel.to == klass._meta.object_name:
        from_ = 'from_%s' % to.lower()
        to = to.lower()
        to = 'to_%s' % to.lower()
    else:
        from_ = klass._meta.object_name.lower()
        to = to.lower()