The methods __iter__() and __len__() of several person-related vocabularies are broken
Bug #583502 reported by
Abel Deuring
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Launchpad itself |
Fix Released
|
Low
|
Unassigned |
Bug Description
Running this script:
from zope.schema.
from lp.registry.
vocabulary_registry = getVocabularyRe
team = getUtility(
team_vocab = vocabulary_
print len(team_vocab)
members_from_vocab = [term.value for term in team_vocab]
unreal_members = [person for person in members_from_vocab
if not person.
print len(unreal_members)
in bin/iharness gives this output:
98
81
__iter__() returns every record of the table Person, and __len__() returns the number of these records. It seems that the class attribute _filter is missing.
tags: | added: tech-debt |
tags: | added: disclosure |
tags: | added: vocabulary |
tags: | added: person-picker |
Changed in launchpad: | |
assignee: | nobody → Curtis Hovey (sinzui) |
Changed in launchpad: | |
assignee: | Curtis Hovey (sinzui) → nobody |
To post a comment you must log in.
We definitely want this fixed when we work on private teams again.