Browse files

Fixed filter_horizontal and filter_vertical handling in admin so that…

… they can

be lists (aren't required to be tuples). It's less error-prone to use one item
lists than one-tuples, but this caused a crash.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
malcolmt committed Jul 20, 2008
1 parent c2ee295 commit ee90b7cf9a166bbe2f7c5622e6ec080759e818ab
Showing with 1 addition and 1 deletion.
  1. +1 −1 django/contrib/admin/
@@ -165,7 +165,7 @@ def formfield_for_dbfield(self, db_field, **kwargs):
if in self.raw_id_fields:
kwargs['widget'] = widgets.ManyToManyRawIdWidget(db_field.rel)
kwargs['help_text'] = ''
- elif in (self.filter_vertical + self.filter_horizontal):
+ elif in (list(self.filter_vertical) + list(self.filter_horizontal)):
kwargs['widget'] = widgets.FilteredSelectMultiple(db_field.verbose_name, ( in self.filter_vertical))
# Wrap the widget's render() method with a method that adds
# extra HTML to the end of the rendered output.

0 comments on commit ee90b7c

Please sign in to comment.