1
0
Fork 0
forked from wezm/wezm.net

Set draft post's kind to 'draft' to the blogging helper ignores them

This commit is contained in:
Wesley Moore 2009-11-22 17:21:16 +11:00
parent 20e39db778
commit 493678c336

View file

@ -109,8 +109,8 @@ module Importer
:section => find_topmost_category(@categories[categories.first])[:slug], :section => find_topmost_category(@categories[categories.first])[:slug],
:title => get(post, 'title'), :title => get(post, 'title'),
:created_at => get(post, 'wp:post_date_gmt'), :created_at => get(post, 'wp:post_date_gmt'),
:kind => 'article',
} }
attributes[:kind] = attributes[:status] == 'publish' ? 'article' : 'draft'
if attributes[:slug].empty? if attributes[:slug].empty?
puts "WARNING: Error post #{attributes[:post_id]} has no slug, generating one" puts "WARNING: Error post #{attributes[:post_id]} has no slug, generating one"