diff --git a/drcr/statements/models.py b/drcr/statements/models.py index 06c8ccc..ef80972 100644 --- a/drcr/statements/models.py +++ b/drcr/statements/models.py @@ -35,9 +35,9 @@ class StatementLine(db.Model): return Amount(self.quantity, self.commodity) def into_transaction(self): - if len(self.reconciliations) > 0: + if self.reconciliation: # Will already be accounted for in a StatementLineTransaction - raise Exception('Should not call into_transaction on a StatementLine with associated StatementLinePosting') + raise Exception('Should not call into_transaction on a reconciled StatementLine') # Not classified unclassified_name = 'Unclassified Statement Line Debits' if -self.quantity >= 0 else 'Unclassified Statement Line Credits'