Skip to content
This repository was archived by the owner on Aug 4, 2023. It is now read-only.

Commit 52d591b

Browse files
committed
Fix alias env var error
1 parent 2e4be76 commit 52d591b

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

flamingo/models/base.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,8 @@ def as_str(self) -> str:
2424
def as_kv(self):
2525
return f'{self.key}={self.value}'
2626

27+
def __str__(self):
28+
return self.as_kv
29+
2730

2831
KeyValue = Dict[str, Any]

flamingo/services/alias_engine.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def replace(self, virtual_value):
3232
try:
3333
replace_with = self.replacements[alias_to]
3434
except KeyError as e:
35-
raise ValidationError(f"Could not find the referenced env var for {virtual_value.as_kv}") from e
35+
raise ValidationError(f"Could not find the referenced value for {alias_to}") from e
3636

3737
return re.sub(ALIAS_REGEX, replace_with, virtual_value)
3838

0 commit comments

Comments
 (0)