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