aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2018-06-07 13:31:25 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2018-06-07 14:45:55 +0200
commitbee8c87e680795b953ea6bfaee5740ad99833b1a (patch)
tree3ed8b6a7d2a20b8d0ebb6412c1074ec072f21af2
parent9b89a5188a8658f91d325947f231b98d08348bce (diff)
downloadwee-slack-bee8c87e680795b953ea6bfaee5740ad99833b1a.tar.gz
Check if user exists in is_user_present
This method may be called before an external user is fetched, so it doesn't exist yet.
-rw-r--r--wee_slack.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index f61168e..f4e3786 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -1097,7 +1097,7 @@ class SlackTeam(object):
def is_user_present(self, user_id):
user = self.users.get(user_id)
- if user.presence == 'active':
+ if user and user.presence == 'active':
return True
else:
return False