Skip to content

Commit

Permalink
fix: decoding of google_service_account_credentials (#4422)
Browse files Browse the repository at this point in the history
  • Loading branch information
AfaqShuaib09 committed Sep 3, 2024
1 parent 0d247a0 commit 8cc1d57
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions course_discovery/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,5 +89,8 @@
# Have images and such that we upload be publicly readable
AWS_DEFAULT_ACL = 'public-read'

# Convert dict keys to lowercase
GOOGLE_SERVICE_ACCOUNT_CREDENTIALS = {k.lower(): v for k, v in GOOGLE_SERVICE_ACCOUNT_CREDENTIALS.items()}
# Convert dict keys to lowercase. The if condition replaces \\n in private_key value with \n.
GOOGLE_SERVICE_ACCOUNT_CREDENTIALS = {
k.lower(): (v.replace("\\n", "\n") if k.lower() == "private_key" else v)
for (k, v) in GOOGLE_SERVICE_ACCOUNT_CREDENTIALS.items()
}

0 comments on commit 8cc1d57

Please sign in to comment.