Skip to content

Commit

Permalink
docs: simplify authorization.md Python code (#1164)
Browse files Browse the repository at this point in the history
  • Loading branch information
arkid15r authored Sep 18, 2024
1 parent e322a28 commit 736185a
Showing 1 changed file with 2 additions and 2 deletions.
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

0 comments on commit 736185a

Please sign in to comment.