summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-02 16:48:09 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2008-05-02 16:48:09 +0000
commit251b1f75e9407d28ef8e952266a9299293a9f040 (patch)
treed331c5828548f039443c84708e8811dc7155298e
parentc65d696f41a1657afaf543a8410500e7dc9ec531 (diff)
downloadredmine-251b1f75e9407d28ef8e952266a9299293a9f040.tar.gz
redmine-251b1f75e9407d28ef8e952266a9299293a9f040.zip
Fixed: error on Trac import when :due attribute is nil (#1164).
git-svn-id: http://redmine.rubyforge.org/svn/trunk@1406 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r--lib/tasks/migrate_from_trac.rake2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/tasks/migrate_from_trac.rake b/lib/tasks/migrate_from_trac.rake
index 7fe1f09ac..48a774eef 100644
--- a/lib/tasks/migrate_from_trac.rake
+++ b/lib/tasks/migrate_from_trac.rake
@@ -92,7 +92,7 @@ namespace :redmine do
set_table_name :milestone
def due
- if read_attribute(:due) > 0
+ if read_attribute(:due) && read_attribute(:due) > 0
Time.at(read_attribute(:due)).to_date
else
nil