Skip to content

Commit

Permalink
Merge pull request #241 from hotosm/fix/aws-secrets-json-parsing
Browse files Browse the repository at this point in the history
Remove optional extra value from credentials JSON
  • Loading branch information
kshitijrajsharma authored Mar 28, 2024
2 parents 6d9774b + ee392a5 commit c062535
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,8 +390,9 @@ def get_db_connection_params() -> dict:
connection_params = json.loads(db_credentials)

connection_params["user"] = connection_params["username"]
for k in ("dbinstanceidentifier", "engine", "username"):
connection_params.pop(k, None)
for k in ("dbinstanceidentifier", "dbClusterIdentifier", "engine", "username"):
if k in connection_params:
connection_params.pop(k, None)

if None in connection_params.values():
raise ValueError(
Expand Down

0 comments on commit c062535

Please sign in to comment.