prevent to return None in get_children_contacts

This commit is contained in:
Yann Leboulanger 2006-01-29 17:56:39 +00:00
parent ce99ea66f8
commit b8243fd45b
1 changed files with 3 additions and 1 deletions

View File

@ -256,7 +256,9 @@ class Contacts:
return [] return []
contacts = [] contacts = []
for j in self._children_meta_contacts[account][jid]: for j in self._children_meta_contacts[account][jid]:
contacts.append(self.get_contact_with_highest_priority(account, j)) c = self.get_contact_with_highest_priority(account, j)
if c:
contacts.append(c)
return contacts return contacts
def get_parent_contact(self, account, contact): def get_parent_contact(self, account, contact):