Skip to content

Commit e922a6d

Browse files
committed
Add existence check
1 parent ef42ea9 commit e922a6d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

slack_bolt/app/app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,8 @@ def __init__(
197197
self._framework_logger.warning(warning_token_skipped())
198198

199199
# after setting bot_only here, __init__ cannot replace authorize function
200-
self._authorize.bot_only = installation_store_bot_only
200+
if self._authorize is not None:
201+
self._authorize.bot_only = installation_store_bot_only
201202

202203
# --------------------------------------
203204
# Middleware Initialization

slack_bolt/app/async_app.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -219,7 +219,8 @@ def __init__(
219219
self._framework_logger.warning(warning_token_skipped())
220220

221221
# after setting bot_only here, __init__ cannot replace authorize function
222-
self._async_authorize.bot_only = installation_store_bot_only
222+
if self._async_authorize is not None:
223+
self._async_authorize.bot_only = installation_store_bot_only
223224

224225
# --------------------------------------
225226
# Middleware Initialization

0 commit comments

Comments
 (0)