Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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
  • Loading branch information...
commit f9ead3fe4276597e7ed69e4b2658040b21df5c76 1 parent dab3e97
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/db/models/fields/related.py
View
2  django/db/models/fields/related.py
@@ -819,7 +819,7 @@ def set_managed(field, model, cls):
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()
Please sign in to comment.
Something went wrong with that request. Please try again.