diff options
author | ThibG <thib@sitedethib.com> | 2021-01-06 22:03:23 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-06 22:03:23 +0100 |
commit | d42e7e01dcd464f80637682d4eee6e5a7f36f26e (patch) | |
tree | 3a594f4d232cad40fa268d66539498db2ea217e2 /app/workers/import | |
parent | 225c934a1b66e2fcbedbda7936666c1ca3c9a04b (diff) | |
parent | 55e84f9125608f12a7d29ec9bf9240e9a48cf4e5 (diff) |
Merge pull request #1482 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers/import')
-rw-r--r-- | app/workers/import/relationship_worker.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/app/workers/import/relationship_worker.rb b/app/workers/import/relationship_worker.rb index 4a455f3ae..4a7100435 100644 --- a/app/workers/import/relationship_worker.rb +++ b/app/workers/import/relationship_worker.rb @@ -15,7 +15,11 @@ class Import::RelationshipWorker case relationship when 'follow' - FollowService.new.call(from_account, target_account, options) + begin + FollowService.new.call(from_account, target_account, options) + rescue ActiveRecord::RecordInvalid + raise if FollowLimitValidator.limit_for_account(from_account) < from_account.following_count + end when 'unfollow' UnfollowService.new.call(from_account, target_account) when 'block' |