Commit 8072001b authored by Dan Pascu's avatar Dan Pascu

Allow name and group attributes to be missing when updating a contact

parent f31ec6ad
......@@ -1196,8 +1196,8 @@ class ContactModel(QAbstractListModel):
@updates_contacts_db
def updateContact(self, contact, attributes):
group = attributes.pop('group')
name = attributes.pop('name')
group = attributes.pop('group', contact.group)
name = attributes.pop('name', contact.name)
for attr, value in attributes.iteritems():
setattr(contact, attr, value)
if contact.name != name or contact.group != group:
......
Markdown is supported
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