diff --git a/app/apps/currencies/utils/convert.py b/app/apps/currencies/utils/convert.py index caa2a94..cc22cd2 100644 --- a/app/apps/currencies/utils/convert.py +++ b/app/apps/currencies/utils/convert.py @@ -43,12 +43,10 @@ def get_exchange_rate( def convert(amount, from_currency: Currency, to_currency: Currency, date=None): if from_currency == to_currency: - return ( - amount, - to_currency.prefix, - to_currency.suffix, - to_currency.decimal_places, - ) + return None, None, None, None + + if amount == 0: + return None, None, None, None if date is None: date = timezone.localtime(timezone.now()) diff --git a/app/templates/net_worth/net_worth.html b/app/templates/net_worth/net_worth.html index 1b1c85e..0254261 100644 --- a/app/templates/net_worth/net_worth.html +++ b/app/templates/net_worth/net_worth.html @@ -37,7 +37,7 @@ - {% if currency.exchanged %} + {% if currency.exchanged and currency.exchanged.amount %}
- {% if entry.exchanged %} + {% if entry.exchanged and entry.exchanged.amount %}
- {% if entry.exchanged %} + {% if entry.exchanged and entry.exchanged.amount %}
- {% if entry.exchanged %} + {% if entry.exchanged and entry.exchanged.amount %}
- {% if entry.exchanged %} + {% if entry.exchanged and entry.exchanged.amount %}
- {% if entry.exchanged %} + {% if entry.exchanged and entry.exchanged.amount %}
- {% if entry.exchanged %} + {% if entry.exchanged and entry.exchanged.amount %}
- {% if entry.exchanged %} + {% if entry.exchanged and entry.exchanged.amount %}