Created
April 29, 2012 10:09
-
-
Save hrehfeld/2549147 to your computer and use it in GitHub Desktop.
Possible patch to address https://code.djangoproject.com/ticket/16855
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- db/models/sql/query_org.py 2012-04-29 12:06:48.798119638 +0200 | |
+++ db/models/sql/query.py 2012-04-29 12:04:20.155210307 +0200 | |
@@ -1753,7 +1753,12 @@ | |
certain related models (as opposed to all models, when | |
self.select_related=True). | |
""" | |
- field_dict = {} | |
+ if self.select_related is False: | |
+ field_dict = {} | |
+ else: | |
+ field_dict = self.select_related | |
for field in fields: | |
d = field_dict | |
for part in field.split(LOOKUP_SEP): |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment