[#4420] Handle edge case when a retainer has no start or end date set.

This commit is contained in:
Eric Davis
2010-09-01 18:49:55 -07:00
parent e5853100d5
commit 994e9b0332

View File

@@ -109,6 +109,7 @@ class RetainerDeliverable < HourlyDeliverable
private
def shrink_budgets_to_new_period
return if beginning_date.nil? || ending_date.nil?
labor_budgets.all.each do |labor_budget|
# Purge un-dated budgets, should not be saved at all
labor_budget.destroy unless labor_budget.year.present?