Commit 12959a78 authored by Yann Leboulanger's avatar Yann Leboulanger
Browse files

prevent adding twice a group in a contact.groups

parent c5e0650c
......@@ -104,10 +104,11 @@ class EditGroupsDialog:
self.changes_made = True
model = self.list.get_model()
model[path][1] = not model[path][1]
if model[path][1]:
self.user.groups.append(model[path][0].decode('utf-8'))
else:
self.user.groups.remove(model[path][0].decode('utf-8'))
jid = model[path][0].decode('utf-8')
if model[path][1] and not jid in self.user.groups:
self.user.groups.append(jid)
elif jid in self.user.groups:
self.user.groups.remove(jid)
self.update_contact()
def init_list(self):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment