Skip to content

Commit

Permalink
Disabled typed-references for find-and-replace scenarios containing s…
Browse files Browse the repository at this point in the history
…ingle references.
  • Loading branch information
AzorianMatt committed Apr 22, 2024
1 parent 28d058e commit 2fe128d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/reflective/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 2fe128d

Please sign in to comment.