Fix add snapshot page
This commit is contained in:
parent
a911b324b5
commit
63c7ab497e
2 changed files with 22 additions and 19 deletions
|
@ -32,6 +32,7 @@
|
|||
</div>
|
||||
</form>
|
||||
|
||||
{% if categories %}
|
||||
<h2>Plot</h2>
|
||||
<div class="chart">
|
||||
{% for cat in categories %}
|
||||
|
@ -83,6 +84,7 @@
|
|||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if snapshot.transactions %}
|
||||
<h2>Transactions ({{ sum|pmvalue }} / {{ snapshot.diff|pmvalue }})</h2>
|
||||
|
|
|
@ -163,6 +163,7 @@ def snapshot(request, uuid=None):
|
|||
"form": _form,
|
||||
}
|
||||
|
||||
if _snapshot.transactions:
|
||||
context["categories"] = (
|
||||
_snapshot.transactions.values("category", "category__name", "category__icon")
|
||||
.annotate(
|
||||
|
|
Loading…
Reference in a new issue