From dbffffa7dc95fc62cbecfd00284bde62ee796f48 Mon Sep 17 00:00:00 2001 From: Jannis Leidel Date: Tue, 28 Jun 2011 10:16:18 +0000 Subject: Fixed #5535 -- Allow using an explicit foreign key in get() calls. Thanks, Michal Petrucha. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16473 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- django/db/models/sql/query.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'django/db/models/sql') diff --git a/django/db/models/sql/query.py b/django/db/models/sql/query.py index 99663b646b..110e3179d5 100644 --- a/django/db/models/sql/query.py +++ b/django/db/models/sql/query.py @@ -1068,8 +1068,9 @@ class Query(object): try: field, target, opts, join_list, last, extra_filters = self.setup_joins( - parts, opts, alias, True, allow_many, can_reuse=can_reuse, - negate=negate, process_extras=process_extras) + parts, opts, alias, True, allow_many, allow_explicit_fk=True, + can_reuse=can_reuse, negate=negate, + process_extras=process_extras) except MultiJoin, e: self.split_exclude(filter_expr, LOOKUP_SEP.join(parts[:e.level]), can_reuse) -- cgit v1.3