Browse files

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...
1 parent e5437af commit 3ba235a348dd00f10cdc85652fb841bc15caca35 @ubernostrum ubernostrum committed Nov 20, 2008
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/admin/views/main.py
View
2 django/contrib/admin/views/main.py
@@ -237,7 +237,7 @@ def construct_search(field_name):
qs = qs.distinct()
break
- if self.opts.one_to_one_field:
+ if self.is_popup and self.opts.one_to_one_field:
qs = qs.complex_filter(self.opts.one_to_one_field.rel.limit_choices_to)
return qs

0 comments on commit 3ba235a

Please sign in to comment.