Files
sure/test
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
..
2026-01-28 17:25:02 +01:00
2025-11-17 21:51:37 +01:00