Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/content/advanced/authorization.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def authorize(enterprise_id, team_id, logger):
# You can implement your own logic to fetch token here
for team in installations:
# enterprise_id doesn't exist for some teams
is_valid_enterprise = True if (("enterprise_id" not in team) or (enterprise_id == team["enterprise_id"])) else False
if ((is_valid_enterprise == True) and (team["team_id"] == team_id)):
is_valid_enterprise = "enterprise_id" not in team or enterprise_id == team["enterprise_id"]
if is_valid_enterprise and team["team_id"] == team_id:
# Return an instance of AuthorizeResult
# If you don't store bot_id and bot_user_id, could also call `from_auth_test_response` with your bot_token to automatically fetch them
return AuthorizeResult(
Expand Down