Files
sure/test/models
Juan Manuel Reyes e66f9543f2 Fix uncategorized budget category showing incorrect available_to_spend (#1117)
The `subcategories` method queries `WHERE parent_id = category.id`, but
for the synthetic uncategorized budget category, `category.id` is nil.
This caused `WHERE parent_id IS NULL` to match ALL top-level categories,
making them appear as subcategories of uncategorized. This inflated
actual_spending and produced a large negative available_to_spend.

Add a nil guard on category.id to return an empty relation for synthetic
categories.

Fixes #819

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-04 11:02:19 +01:00
..
2025-10-28 19:32:27 +01:00
2025-11-11 19:51:07 +01:00
2025-11-11 19:51:07 +01:00
2025-05-24 17:58:17 -04:00