                    {% endif %}
                                            {% endif %}
                                        {% endfor %}
                                    {% elif expense.category %}
                                        {% if expense.category.name in months[month].by_category %}
                                            {% set _ = months[month].by_category.update({
                                                expense.category.name: {
                                            