make sure tracks does not crash on missing every_other2 for recurring todos

This commit is contained in:
Reinier Balt 2010-04-19 14:05:02 +02:00
parent c769b2a7eb
commit 33af53c313

View file

@ -337,7 +337,7 @@ class RecurringTodo < ActiveRecord::Base
return 'weekly'
end
when 'monthly'
return "invalid repeat pattern" if every_other1.nil?
return "invalid repeat pattern" if every_other1.nil? || every_other2.nil?
if self.recurrence_selector == 0
return "every #{self.every_other2} month#{self.every_other2>1?'s':''} on day #{self.every_other1}"
else