fix the null person ID bug in profile
This commit is contained in:
parent
3ebda174fb
commit
0913389698
1 changed files with 2 additions and 1 deletions
|
|
@ -138,13 +138,14 @@ class Person < ActiveRecord::Base
|
|||
#hcard_profile = HCard.find profile.hcard.first[:href]
|
||||
Rails.logger.info("event=webfinger_marshal valid=#{new_person.valid?} target=#{new_person.diaspora_handle}")
|
||||
new_person.url = hcard[:url]
|
||||
new_person.profile = Profile.create!(:first_name => hcard[:given_name],
|
||||
new_person.profile = Profile.new(:first_name => hcard[:given_name],
|
||||
:last_name => hcard[:family_name],
|
||||
:image_url => hcard[:photo],
|
||||
:image_url_medium => hcard[:photo_medium],
|
||||
:image_url_small => hcard[:photo_small],
|
||||
:searchable => hcard[:searchable])
|
||||
new_person.save!
|
||||
new_person.profile.save!
|
||||
new_person
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue