Skip to content

armgit / sure

Public Imported from GitHub
0

The personal finance app for everyone (by everyone)

Ruby

fix: allow saving a budget without any category allocation (#3101)

GFR0ff5b0f27482
diff --git a/app/views/budget_categories/_confirm_button.html.erb b/app/views/budget_categories/_confirm_button.html.erb
index 2cdccdfa0a..39a815d5b0 100644
--- a/app/views/budget_categories/_confirm_button.html.erb
+++ b/app/views/budget_categories/_confirm_button.html.erb
@@ -5,6 +5,6 @@
full_width: true,
href: budget_path(budget, **budget_owner_query),
method: :get,
- disabled: !budget.allocations_valid?
+ disabled: !budget.initialized? || budget.available_to_allocate.negative?
) %>
</div>