Skip to content

Commit

Permalink
Enumerate over parties in app
Browse files Browse the repository at this point in the history
  • Loading branch information
daffidwilde committed Mar 27, 2024
1 parent 28d3ce6 commit ac3a04b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pprl/app/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ def upload_to_gcp(data, embedder):

location = environ.get("PROJECT_LOCATION", "global")

party_num = next(i + 1 for i, part in app.config["parties"] if party == part)
party_num = next(i + 1 for i, part in enumerate(app.config["parties"]) if party == part)
version = environ.get(f"PARTY_{party_num}_KEY_VERSION", 1)

data_encrypted, dek = encryption.encrypt_data(data)
Expand Down

0 comments on commit ac3a04b

Please sign in to comment.