[#6441] Fix a Deliverable validation error when editing with a status change

This commit is contained in:
Eric Davis
2011-08-09 15:23:08 -07:00
parent ac24ae08e6
commit 0a916fea70
2 changed files with 3 additions and 3 deletions
+3 -1
View File
@@ -86,7 +86,9 @@ class Deliverable < ActiveRecord::Base
noop("Allow changes to the status only")
elsif changes["status"].present? && changes["status"].second == "open"
noop("Allow any changes when going to 'open'")
elsif changes["status"].present?
elsif changes["status"].present? && changes["status"].first == "open"
noop("Allow any changes when going from 'open' to another status")
else
errors.add_to_base(:cant_update_locked_deliverable) if locked?
errors.add_to_base(:cant_update_closed_deliverable) if closed?
end