diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2018-06-07 13:31:25 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2018-06-07 14:45:55 +0200 |
commit | bee8c87e680795b953ea6bfaee5740ad99833b1a (patch) | |
tree | 3ed8b6a7d2a20b8d0ebb6412c1074ec072f21af2 /wee_slack.py | |
parent | 9b89a5188a8658f91d325947f231b98d08348bce (diff) | |
download | wee-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.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 2 |
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 |