From d9d649d430d81188b0c1b5b0155935c0e5ac14e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20Marussy?= Date: Mon, 25 Jan 2021 01:55:43 +0100 Subject: Fix type errors --- beancount_extras_kris7t/importers/transferwise/transferwise_json.py | 2 ++ 1 file changed, 2 insertions(+) (limited to 'beancount_extras_kris7t/importers/transferwise/transferwise_json.py') diff --git a/beancount_extras_kris7t/importers/transferwise/transferwise_json.py b/beancount_extras_kris7t/importers/transferwise/transferwise_json.py index c42de90..68ddc6d 100644 --- a/beancount_extras_kris7t/importers/transferwise/transferwise_json.py +++ b/beancount_extras_kris7t/importers/transferwise/transferwise_json.py @@ -211,6 +211,8 @@ class Row(utils.Row): # Also add the "fudge" amounts to the fees generated by rounding currency conversions. all_fees = Inventory() all_fees.add_inventory(self._fees) + if not self.postings: + raise InvalidEntry('Trying to create transaction without postings') for acc, assigned_units in self.postings: for conversion in self._conversions: units, price, fudge = conversion.get_fraction( -- cgit v1.2.3