From ac3a04b16ae49220b10dd20e6e02880294ce2ba7 Mon Sep 17 00:00:00 2001 From: Henry Wilde Date: Wed, 27 Mar 2024 13:04:55 +0000 Subject: [PATCH] Enumerate over parties in app --- src/pprl/app/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pprl/app/__init__.py b/src/pprl/app/__init__.py index 15c97d6..0956eb1 100644 --- a/src/pprl/app/__init__.py +++ b/src/pprl/app/__init__.py @@ -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)