Import content without a category into Uncategorized

This commit is contained in:
Wesley Moore 2010-03-10 19:54:54 +11:00
parent b44a648002
commit 5fcc8d4390

View file

@ -93,6 +93,10 @@ module Importer
end end
categories.uniq! categories.uniq!
if categories.empty?
categories << 'Uncategorized'
end
begin begin
post_date = Date.strptime(get(post, 'wp:post_date_gmt'), "%Y-%m-%d %H:%M:%S") post_date = Date.strptime(get(post, 'wp:post_date_gmt'), "%Y-%m-%d %H:%M:%S")
rescue ArgumentError rescue ArgumentError