OrderedMultiSelectWidget can't handle single selection properly
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 3 |
Invalid
|
Critical
|
Unassigned |
Bug Description
# in advance, I apologize my rude english.
OrderedMultiSel
below is an excerpt from 'itemswidget.py' in 'zope.app.
(cuurent revision of 'itemswidget.py' is 39064)
--
570 def selected(self):
571 """Return a list of tuples (text, value) that are selected."""
572 # Get form values
573 values = self._getFormVa
574 # Not all content objects must necessarily support the attributes
575 if hasattr(
576 # merge in values from content
577 for value in self.context.
578 if value not in values:
579 values.
580
581 terms = [self.vocabular
582 for value in values]
583 return [{'text': self.textForVal
584 for term in terms]
--
if 'values' at 573 is a single value like 'abc' not a list,
the sigle value is shredded into meaningless values like 'a' or 'b'.
It results in an exception raised by getTerm() at 581.
I thik it would be a bug.
I'm totally newbie about python and zope3.
If it's not a bug, please forgive me.
regards.
Changes: submitter email, importance (medium => critical)