fix #1305 and #1309 for 2.1 branch

This commit is contained in:
Reinier Balt 2012-08-26 20:07:10 +02:00
parent 0ce61f0312
commit 0fd7bc5c1c

View file

@ -127,7 +127,7 @@ class Todo < ActiveRecord::Base
end
def validate
if !show_from.blank? && show_from < user.date
if !show_from.blank? && show_from < user.date && show_from_changed?
errors.add("show_from", I18n.t('models.todo.error_date_must_be_future'))
end
unless @predecessor_array.nil? # Only validate predecessors if they changed