Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

Fix: BudgetCategoriesController#show NoMethodError for missing budget (#2709)

sentry[bot]835ebf43bfb0
diff --git a/app/controllers/budget_categories_controller.rb b/app/controllers/budget_categories_controller.rb
index 65880ea05a..89061834a3 100644
--- a/app/controllers/budget_categories_controller.rb
+++ b/app/controllers/budget_categories_controller.rb
@@ -51,6 +51,6 @@ class BudgetCategoriesController < ApplicationController
def set_budget
start_date = Budget.param_to_date(params[:budget_month_year], family: Current.family)
- @budget = Current.family.budgets.find_by(start_date: start_date)
+ @budget = Current.family.budgets.find_by!(start_date: start_date)
end
end