Skip to content
Snippets Groups Projects
Commit eda8ec84 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

fix a TB: we can have a row without an account during a short time ... I don't know why

parent 425023e0
No related branches found
No related tags found
No related merge requests found
......@@ -2366,7 +2366,9 @@ def compareIters(self, model, iter1, iter2, data = None):
jid2 = model[iter2][C_JID].decode('utf-8')
# We first compare by show if sort_by_show is True
if type1 == 'contact' and type2 == 'contact' and \
gajim.config.get('sort_by_show'):
gajim.config.get('sort_by_show'):
if account1 and account2: # We an have contact without account
# during a short time ... why?
luser1 = gajim.contacts[account1][jid1]
luser2 = gajim.contacts[account2][jid2]
cshow = {'online':0, 'chat': 1, 'away': 2, 'xa': 3, 'dnd': 4,
......@@ -2390,7 +2392,7 @@ def compareIters(self, model, iter1, iter2, data = None):
return -1
if name2.lower() < name1.lower():
return 1
if type1 == 'contact' and type2 == 'contact':
if type1 == 'contact' and type2 == 'contact' and account1 and account2:
# We compare account names
if account1.lower() < account2.lower():
return -1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment