Skip to content

Commit 1db956f

Browse files
committed
Properly compute assets groups
1 parent 2308bac commit 1db956f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/pages/net_worth_pages.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void budget::assets_card(budget::html_writer& w) {
3737

3838
// If one asset has no group, we disable grouping
3939
if (group_style) {
40-
for (const auto& asset : w.cache.user_assets()) {
40+
for (const auto& [asset, amount] : w.cache.user_assets() | expand_value(w.cache) | not_zero) {
4141
auto pos = asset.name.find(separator);
4242
if (pos == 0 || pos == std::string::npos) {
4343
group_style = false;
@@ -49,7 +49,7 @@ void budget::assets_card(budget::html_writer& w) {
4949
if (group_style) {
5050
std::vector<std::string> groups;
5151

52-
for (const auto& asset : w.cache.user_assets()) {
52+
for (const auto& [asset, amount] : w.cache.user_assets() | expand_value(w.cache) | not_zero) {
5353
std::string group = asset.name.substr(0, asset.name.find(separator));
5454

5555
if (!std::ranges::contains(groups, group)) {

0 commit comments

Comments
 (0)