From 5fcc8d43900a49f319be68bdad5bdc26938fc3e4 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Wed, 10 Mar 2010 19:54:54 +1100 Subject: [PATCH] Import content without a category into Uncategorized --- importer/wordpress.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/importer/wordpress.rb b/importer/wordpress.rb index 4461f4c..04c99e2 100644 --- a/importer/wordpress.rb +++ b/importer/wordpress.rb @@ -93,6 +93,10 @@ module Importer end categories.uniq! + if categories.empty? + categories << 'Uncategorized' + end + begin post_date = Date.strptime(get(post, 'wp:post_date_gmt'), "%Y-%m-%d %H:%M:%S") rescue ArgumentError