diff --git a/lib/diaspora/importer.rb b/lib/diaspora/importer.rb index dbe15825a..e1e8ad97f 100644 --- a/lib/diaspora/importer.rb +++ b/lib/diaspora/importer.rb @@ -151,8 +151,8 @@ module Diaspora aspect = Aspect.new aspect.name = a.xpath('/aspect/name').text - aspect.post_ids = a.xpath('/aspect/post_ids/post_id').collect(&:text) - aspect.person_ids = a.xpath('/aspect/person_ids/person_id').collect(&:text) + aspect.post_ids = a.xpath('/aspect/post_ids/post_id').collect{ |x| x.text.to_id } + aspect.person_ids = a.xpath('/aspect/person_ids/person_id').collect{ |x| x.text.to_id } aspects << aspect end aspects diff --git a/spec/lib/importer_spec.rb b/spec/lib/importer_spec.rb index 00ac5730a..06d92e227 100644 --- a/spec/lib/importer_spec.rb +++ b/spec/lib/importer_spec.rb @@ -202,6 +202,8 @@ describe Diaspora::Importer do Post.count.should == 4 n.aspects.count.should == 6 Person.count.should be == 5 + + User.first.person.diaspora_handle.should == User.first.diaspora_handle Person.find_by_id( @user1.person.id ).nil?.should == false