]> source.dussan.org Git - redmine.git/commitdiff
Prevent error when Mantis version.date_order is nil (#7476).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 28 Jan 2011 19:45:09 +0000 (19:45 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Fri, 28 Jan 2011 19:45:09 +0000 (19:45 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@4765 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/tasks/migrate_from_mantis.rake

index cd82872c18dff078b40a022712d75c13df05ae79..c45ce68e37b33f0c4bde333f0c16a044a39e7371 100644 (file)
@@ -287,7 +287,7 @@ task :migrate_from_mantis => :environment do
        project.versions.each do |version|\r
           v = Version.new :name => encode(version.version),\r
                           :description => encode(version.description),\r
-                          :effective_date => version.date_order.to_date\r
+                          :effective_date => (version.date_order ? version.date_order.to_date : nil)\r
           v.project = p\r
           v.save\r
           versions_map[version.id] = v.id\r