Skip to content

Commit

Permalink
catch error where single values are put in ignore list as strings spl…
Browse files Browse the repository at this point in the history
…it on character, which then causes ignore popping to bust a key error
  • Loading branch information
eleddy committed May 8, 2013
1 parent 60414e5 commit bf22c27
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ CHANGES
--------------------

- Added support for IDict Widget in MultiWidget.
- Catch bug where if a select value was set as from hidden input
or through a rest url as a single value, it won't error out
when trying to remove from ignored list. Probably not the 100%
right fix but it catches core dumps and is sane anyways.


3.0.0a3 (2013-04-08)
Expand Down
2 changes: 1 addition & 1 deletion src/z3c/form/browser/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def items(self):

def addItem(idx, term, prefix=''):
selected = self.isSelected(term)
if selected:
if selected and term.token in ignored:
ignored.remove(term.token)
id = '%s-%s%i' % (self.id, prefix, idx)
content = term.token
Expand Down

0 comments on commit bf22c27

Please sign in to comment.