Verified Commit 35881c58 authored by Carl Schwan's avatar Carl Schwan 🚴

Use updated if published is not present

parent 352e278d
...@@ -20,7 +20,13 @@ def run( args ) ...@@ -20,7 +20,13 @@ def run( args )
Pluto.connect( @db_config ) Pluto.connect( @db_config )
Pluto::Model::Item.latest.where.not(title: '', published: nil).limit(1000).each_with_index do |item,i| Pluto::Model::Item.latest.where.not(title: '').limit(1000).each_with_index do |item,i|
if item.published == nil and item.updated == nil
next
end
if item.published == nil and item.updated != nil
item.published = item.updated
end
puts "[#{i+1}] #{item.title}" puts "[#{i+1}] #{item.title}"
generate_blog_post( item ) generate_blog_post( item )
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment