Skip to content

Commit c959966

Browse files
authored
Update authorization.md
1 parent 736185a commit c959966

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/i18n/ja-jp/docusaurus-plugin-content-docs/current/advanced/authorization.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def authorize(enterprise_id, team_id, logger):
4747
# トークンを取得するためのあなたのロジックをここに記述します
4848
for team in installations:
4949
# 一部のチームは enterprise_id を持たない場合があります
50-
is_valid_enterprise = True if (("enterprise_id" not in team) or (enterprise_id == team["enterprise_id"])) else False
51-
if ((is_valid_enterprise == True) and (team["team_id"] == team_id)):
50+
is_valid_enterprise = "enterprise_id" not in team or enterprise_id == team["enterprise_id"]
51+
if is_valid_enterprise and team["team_id"] == team_id:
5252
# AuthorizeResult のインスタンスを返します
5353
# bot_id と bot_user_id を保存していない場合、bot_token を使って `from_auth_test_response` を呼び出すと、自動的に取得できます
5454
return AuthorizeResult(
@@ -65,4 +65,4 @@ app = App(
6565
signing_secret=os.environ["SLACK_SIGNING_SECRET"],
6666
authorize=authorize
6767
)
68-
```
68+
```

0 commit comments

Comments
 (0)