diff --git a/app/models/conference.rb b/app/models/conference.rb index f3565814..2b3526b2 100644 --- a/app/models/conference.rb +++ b/app/models/conference.rb @@ -591,7 +591,7 @@ class Conference < ActiveRecord::Base # # Reports an error when such a condition is found def valid_date_range? - errors.add(:start_date, "Start date is greater than End date") if start_date > end_date + errors.add(:start_date, 'Start date is greater than End date') if start_date && end_date && start_date > end_date end ##