Skip to content

Commit

Permalink
Update error information when currency does not match
Browse files Browse the repository at this point in the history
  • Loading branch information
WojtekMs committed Feb 9, 2024
1 parent e5bf1ca commit 057e99c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/banker/data/transaction.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ class Transaction:

def __post_init__(self):
if self.value.currency != PLN:
raise ValueError("The only accepted transaction currency is PLN")
raise ValueError("The only accepted transaction currency is PLN, "
f"but is: {self.value.currency}")

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

0 comments on commit 057e99c

Please sign in to comment.