From: Jean-Philippe Lang Date: Fri, 28 Jan 2011 19:45:09 +0000 (+0000) Subject: Prevent error when Mantis version.date_order is nil (#7476). X-Git-Tag: 1.2.0~1035 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=d39e12c202fcee615f217e50f92f28ebeb6527ce;p=redmine.git Prevent error when Mantis version.date_order is nil (#7476). git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4765 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/lib/tasks/migrate_from_mantis.rake b/lib/tasks/migrate_from_mantis.rake index cd82872c1..c45ce68e3 100644 --- a/lib/tasks/migrate_from_mantis.rake +++ b/lib/tasks/migrate_from_mantis.rake @@ -287,7 +287,7 @@ task :migrate_from_mantis => :environment do project.versions.each do |version| v = Version.new :name => encode(version.version), :description => encode(version.description), - :effective_date => version.date_order.to_date + :effective_date => (version.date_order ? version.date_order.to_date : nil) v.project = p v.save versions_map[version.id] = v.id