[#4420] Handle edge case when a retainer has no start or end date set.
This commit is contained in:
1 parent
e5853100d5
commit
994e9b0332
1 file changed
+1
@@ -109,6 +109,7 @@ class RetainerDeliverable < HourlyDeliverable
|
|||||||
private
|
private
|
||||||
|
|
||||||
def shrink_budgets_to_new_period
|
def shrink_budgets_to_new_period
|
||||||
|
return if beginning_date.nil? || ending_date.nil?
|
||||||
labor_budgets.all.each do |labor_budget|
|
labor_budgets.all.each do |labor_budget|
|
||||||
# Purge un-dated budgets, should not be saved at all
|
# Purge un-dated budgets, should not be saved at all
|
||||||
labor_budget.destroy unless labor_budget.year.present?
|
labor_budget.destroy unless labor_budget.year.present?
|
||||||
|
|||||||
Reference in new issue
Block a user