Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

OneToOne filtering should only apply in a popup selection from the re…

…lated model.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 3ba235a348dd00f10cdc85652fb841bc15caca35 1 parent e5437af
James Bennett authored November 20, 2008

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/contrib/admin/views/main.py
2  django/contrib/admin/views/main.py
@@ -237,7 +237,7 @@ def construct_search(field_name):
237 237
                     qs = qs.distinct()
238 238
                     break
239 239
 
240  
-        if self.opts.one_to_one_field:
  240
+        if self.is_popup and self.opts.one_to_one_field:
241 241
             qs = qs.complex_filter(self.opts.one_to_one_field.rel.limit_choices_to)
242 242
 
243 243
         return qs

0 notes on commit 3ba235a

Please sign in to comment.
Something went wrong with that request. Please try again.