From e110e0abb0e0173a17b976717c7c8e396d3a0f85 Mon Sep 17 00:00:00 2001 From: Jeremy Stein Date: Fri, 12 Jan 2024 10:11:23 +0000 Subject: [PATCH] Fix error in placeholder substitution (#217) --- pixl_ehr/src/pixl_ehr/_queries.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pixl_ehr/src/pixl_ehr/_queries.py b/pixl_ehr/src/pixl_ehr/_queries.py index 5dc29a1b7..d9a07e69c 100644 --- a/pixl_ehr/src/pixl_ehr/_queries.py +++ b/pixl_ehr/src/pixl_ehr/_queries.py @@ -40,8 +40,9 @@ def _replace_placeholders_and_populate_values(self, context: dict) -> None: if ":" not in line and "${{" not in line: continue + new_line = line for key, value in context.items(): - new_line = line.replace("${{ " + str(key) + " }}", str(value)) + new_line = new_line.replace("${{ " + str(key) + " }}", str(value)) n = new_line.count(f":{key}") self.values += n * [value]