Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed error when selected to use offset while offset is nil

  • Loading branch information...
commit e5e6eac3de08d8ee0399346bfe58da68bea69690 1 parent 616316f
@k41n authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 app/models/milestone.rb
View
4 app/models/milestone.rb
@@ -135,7 +135,7 @@ def issues_count
end
def start_date
- if fixed_start_date
+ if fixed_start_date || start_date_offset.nil?
read_attribute(:start_date)
else
start_date_offset.days.since(self.previous_start_date_milestone.planned_end_date) unless self.previous_start_date_milestone.nil? or self.previous_start_date_milestone.planned_end_date.nil?
@@ -143,7 +143,7 @@ def start_date
end
def planned_end_date
- if fixed_planned_end_date
+ if fixed_planned_end_date || planned_end_date_offset.nil?
read_attribute(:planned_end_date)
else
return nil if planned_end_date_offset.nil?
Please sign in to comment.
Something went wrong with that request. Please try again.