Skip to content

Commit 057e99c

Browse files
committedFeb 9, 2024
Update error information when currency does not match
1 parent e5bf1ca commit 057e99c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎src/banker/data/transaction.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,8 @@ class Transaction:
1414

1515
def __post_init__(self):
1616
if self.value.currency != PLN:
17-
raise ValueError("The only accepted transaction currency is PLN")
17+
raise ValueError("The only accepted transaction currency is PLN, "
18+
f"but is: {self.value.currency}")
1819

1920
def find_matching(self, categories: list[Category]) -> list[Category]:
2021
result = []

0 commit comments

Comments
 (0)