diff --git a/lib/common.rb b/lib/common.rb index a2e67659a..2359b2b70 100644 --- a/lib/common.rb +++ b/lib/common.rb @@ -9,7 +9,8 @@ module Diaspora author_hash = parse_author(doc) entry_hash = parse_entry(doc) - author = Author.instantiate(author_hash).ostatus_posts.create(entry_hash) + author = Author.instantiate(author_hash) + author.ostatus_posts.create(entry_hash) unless entry_hash[:message] == 0 end def self.parse_author(doc) diff --git a/lib/tasks/db.rake b/lib/tasks/db.rake index a9bf81ee7..b0e7b033c 100644 --- a/lib/tasks/db.rake +++ b/lib/tasks/db.rake @@ -30,6 +30,8 @@ namespace :db do Person.delete_all User.delete_all Request.delete_all + Author.delete_all + OstatusPost.delete_all Album.delete_all end