about summary refs log tree commit diff
diff options
context:
space:
mode:
authorYann GUERN <y.guern@rock-hosting.com>2017-04-08 03:24:35 +0200
committerGitHub <noreply@github.com>2017-04-08 03:24:35 +0200
commit485d75a80500f12fcb59191a79a514fb5ad1c4e3 (patch)
treebfe4d181d48bbe2fcd1aa0774877ad98517fedf9
parenta872f2f4c64f4a370fa1a92a28f9c07c1dd3b06d (diff)
#1141 on remote follow
The async action is send before persist, account.id not yet generated

Pull queue receive 'nil' so no profile update.
-rw-r--r--app/services/follow_remote_account_service.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/services/follow_remote_account_service.rb b/app/services/follow_remote_account_service.rb
index 936953429..9ca7f653a 100644
--- a/app/services/follow_remote_account_service.rb
+++ b/app/services/follow_remote_account_service.rb
@@ -51,8 +51,8 @@ class FollowRemoteAccountService < BaseService
     account.uri     = get_account_uri(xml)
     account.hub_url = hubs.first.attribute('href').value
 
-    get_profile(body, account)
     account.save!
+    get_profile(body, account)
 
     account
   end