From 2fe128df3fbee0aa40d22261e8373bcbda53caff Mon Sep 17 00:00:00 2001 From: Matt Scott Date: Mon, 22 Apr 2024 13:11:57 -0400 Subject: [PATCH] Disabled typed-references for find-and-replace scenarios containing single references. --- src/reflective/util.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/reflective/util.py b/src/reflective/util.py index ae6ac66..5c26d29 100644 --- a/src/reflective/util.py +++ b/src/reflective/util.py @@ -123,10 +123,10 @@ def update(source: str, ref: str, value: any) -> any: ref_pattern = f'$r{{{ref}}}' # Provide typed references when sole references are found - if source.replace(ref_pattern, '').strip() == '': - if isinstance(value, QueryResult) and len(value) == 1: - return value[0] - return value + # if source.replace(ref_pattern, '').strip() == '': + # if isinstance(value, QueryResult) and len(value) == 1: + # return value[0] + # return value # Update the string value with the query value if isinstance(value, QueryResult) and len(value) == 1: