diff --git a/fava_investor/modules/assetalloc_class/libassetalloc.py b/fava_investor/modules/assetalloc_class/libassetalloc.py index 8ff0e42..1228de0 100644 --- a/fava_investor/modules/assetalloc_class/libassetalloc.py +++ b/fava_investor/modules/assetalloc_class/libassetalloc.py @@ -28,6 +28,7 @@ def serialise(self, currency): "balance_children": {currency: self.balance_children}, "balance": {currency: self.balance}, "children": children, + "has_txns": False, } def pretty_print(self, indent=0): diff --git a/fava_investor/templates/Investor.html b/fava_investor/templates/Investor.html index 60f0054..442926e 100644 --- a/fava_investor/templates/Investor.html +++ b/fava_investor/templates/Investor.html @@ -185,11 +185,13 @@

What not to buy

{% if (module == 'aa_class') %}

Portfolio: Asset Allocation by Class

- {% set chart_data = [] %} {% set results = extension.build_assetalloc_by_class() %} - - {% set serialised_tree = results[0].serialise(results[0]['currency']) %} - {% set chart_data = [{ 'type': 'hierarchy', 'label': 'Asset Allocation', 'data': serialised_tree }] %} + {% set chart_data = [{ + 'type': 'hierarchy', + 'label': "Asset Allocation", + 'data': results[0].serialise(results[0]['currency']) + }] + %} {{ asset_tree(results[0]) }}