From 76d2b35dd4a0285a951dece7eb94e98541b33f62 Mon Sep 17 00:00:00 2001 From: hjust Date: Fri, 30 Apr 2010 10:18:45 +0000 Subject: [PATCH] Fixed: 500 during deletion of s labor_budget_item git-svn-id: https://dev.finn.de/svn/cockpit/trunk@1020 7926756e-e54e-46e6-9721-ed318f58905e --- app/models/variable_cost_object.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/variable_cost_object.rb b/app/models/variable_cost_object.rb index 3ac4845fe4..e7b7a2ea3a 100644 --- a/app/models/variable_cost_object.rb +++ b/app/models/variable_cost_object.rb @@ -97,8 +97,8 @@ class VariableCostObject < CostObject labor_budget_items.reject(&:new_record?).each do |labor_budget_item| attributes = labor_budget_item_attributes[labor_budget_item.id.to_s] - attributes[:budget] = Rate.clean_currency(attributes[:budget]) if attributes && attributes[:hours].to_i > 0 && attributes[:user_id].to_i > 0 + attributes[:budget] = Rate.clean_currency(attributes[:budget]) labor_budget_item.attributes = attributes else labor_budget_items.delete(labor_budget_item)