Skip to content
Browse files

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

…lated model.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent e5437af commit 3ba235a348dd00f10cdc85652fb841bc15caca35 @ubernostrum ubernostrum committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/admin/views/
2 django/contrib/admin/views/
@@ -237,7 +237,7 @@ def construct_search(field_name):
qs = qs.distinct()
- 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.
Something went wrong with that request. Please try again.