add page id to comments on import

master
Coleman 2008-06-27 01:49:11 -05:00
parent ada6dd14b4
commit 0264081c08
1 changed files with 1 additions and 1 deletions

View File

@ -63,7 +63,7 @@ pages.each do |p|
next unless comment['nid'].to_i == p.nid.to_i
c2 = Time.now
c2 -= (c2.to_i - comment['timestamp'].to_i).seconds
c = Comment.create(:comment => comment['comment'], :user => comment['name'], :url => comment['homepage'], :created_at => c2)
c = Comment.create(:comment => comment['comment'], :user => comment['name'], :url => comment['homepage'], :created_at => c2, :page_id => p.id)
if c.new_record?
\$stderr.puts "FAILED TO SAVE COMMENT ON PAGE #{p.id} NODE #{p.nid}"
c.errors.each_full { |msg| \$stderr.puts "* #{msg}" }