diff options
author | Kristóf Marussy <kristof@marussy.com> | 2021-01-25 01:55:43 +0100 |
---|---|---|
committer | Kristóf Marussy <kristof@marussy.com> | 2021-01-25 01:55:43 +0100 |
commit | d9d649d430d81188b0c1b5b0155935c0e5ac14e2 (patch) | |
tree | b02d1ab8aa43a0f2aeb79e91eeb340b5de27e718 /beancount_extras_kris7t/importers/transferwise/transferwise_json.py | |
parent | Make Pyright happy by importing load_doc directly (diff) | |
download | beancount-extras-kris7t-d9d649d430d81188b0c1b5b0155935c0e5ac14e2.tar.gz beancount-extras-kris7t-d9d649d430d81188b0c1b5b0155935c0e5ac14e2.tar.zst beancount-extras-kris7t-d9d649d430d81188b0c1b5b0155935c0e5ac14e2.zip |
Fix type errors
Diffstat (limited to 'beancount_extras_kris7t/importers/transferwise/transferwise_json.py')
-rw-r--r-- | beancount_extras_kris7t/importers/transferwise/transferwise_json.py | 2 |
1 files changed, 2 insertions, 0 deletions
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): | |||
211 | # Also add the "fudge" amounts to the fees generated by rounding currency conversions. | 211 | # Also add the "fudge" amounts to the fees generated by rounding currency conversions. |
212 | all_fees = Inventory() | 212 | all_fees = Inventory() |
213 | all_fees.add_inventory(self._fees) | 213 | all_fees.add_inventory(self._fees) |
214 | if not self.postings: | ||
215 | raise InvalidEntry('Trying to create transaction without postings') | ||
214 | for acc, assigned_units in self.postings: | 216 | for acc, assigned_units in self.postings: |
215 | for conversion in self._conversions: | 217 | for conversion in self._conversions: |
216 | units, price, fudge = conversion.get_fraction( | 218 | units, price, fudge = conversion.get_fraction( |