From 6b1bb086b559618d520c6ffe9c26f00787c5633a Mon Sep 17 00:00:00 2001 From: houssine Date: Tue, 5 Nov 2019 17:30:27 +0100 Subject: [PATCH] [IMP] raise error when case not handled yet --- easy_my_coop_loan/models/loan.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/easy_my_coop_loan/models/loan.py b/easy_my_coop_loan/models/loan.py index 74789ec..7fd6676 100644 --- a/easy_my_coop_loan/models/loan.py +++ b/easy_my_coop_loan/models/loan.py @@ -172,6 +172,9 @@ class LoanIssue(models.Model): if self.interest_payment == 'end': due_date = self.term_date + else: + raise NotImplementedError(_("Interest payment by year hasn't been " + "implemented yet")) for line in self.loan_issue_lines: # TODO remove this line line.interest_lines.unlink() @@ -186,4 +189,5 @@ class LoanIssue(models.Model): rounded_term = int(self.term.term) if self.term.term - rounded_term > 0: # TODO Handle this case - _logger.info("todo") + raise NotImplementedError(_("Calculation on non entire year " + "hasn't been implemented yet"))