Skip to content

Commit

Permalink
change TypeError test
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenneth Kehl committed Sep 4, 2024
1 parent cf246ab commit 33568d4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions app/authentication/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,10 @@ def requires_internal_auth(expected_client_id):
f"TODO REMOVE: Enter requires_internal_auth with expected client id {expected_client_id}"
)
# Looks like we are hitting this for some reason
if expected_client_id not in current_app.config.get("INTERNAL_CLIENT_API_KEYS"):
keys = current_app.config.get("INTERNAL_CLIENT_API_KEYS")
# expected_client_id looks like ADMIN_CLIENT_USERNAME on the admin side, and
# INTERNAL_CLIENT_API_KEYS is a dict
keys = current_app.config.get("INTERNAL_CLIENT_API_KEYS")
if keys.get(expected_client_id) is None:
debug_not_production(
f"TODO REMOVE: {expected_client_id} not in {keys}, raising TypeError\n"
)
Expand Down

0 comments on commit 33568d4

Please sign in to comment.