add in is_connected property to base objects
This commit is contained in:
parent
11c9d60111
commit
fad008d660
1 changed files with 8 additions and 0 deletions
|
|
@ -206,6 +206,14 @@ class DefaultObject(with_metaclass(TypeclassBase, ObjectDB)):
|
||||||
def sessions(self):
|
def sessions(self):
|
||||||
return ObjectSessionHandler(self)
|
return ObjectSessionHandler(self)
|
||||||
|
|
||||||
|
@property
|
||||||
|
def is_connected(self):
|
||||||
|
# we get an error for objects subscribed to channels without this
|
||||||
|
if self.account: # seems sane to pass on the account
|
||||||
|
return self.account.is_connected
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def has_account(self):
|
def has_account(self):
|
||||||
"""
|
"""
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue