Commit d001b904 authored by Dan Pascu's avatar Dan Pascu

Fixed retrieving state and note for non-addressbook contacts

parent 0fd86e52
......@@ -866,11 +866,11 @@ class Contact(object):
@property
def state(self):
return self.settings.presence.state
return self.settings.presence.state if isinstance(self.settings, addressbook.Contact) else None
@property
def note(self):
return self.settings.presence.note
return self.settings.presence.note if isinstance(self.settings, addressbook.Contact) else None
@property
def icon(self):
......@@ -992,11 +992,11 @@ class ContactDetail(object):
@property
def state(self):
return self.settings.presence.state
return self.settings.presence.state if isinstance(self.settings, addressbook.Contact) else None
@property
def note(self):
return self.settings.presence.note
return self.settings.presence.note if isinstance(self.settings, addressbook.Contact) else None
@property
def icon(self):
......
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