about summary refs log tree commit diff
path: root/app/workers
diff options
context:
space:
mode:
authorThibG <thib@sitedethib.com>2018-10-05 19:01:44 +0200
committerGitHub <noreply@github.com>2018-10-05 19:01:44 +0200
commit515ce8f4697fe7edfdf14c45575a71164b920db9 (patch)
tree1211e136ba3e886ee8daaa5200babffc42375dd1 /app/workers
parenta9e8f98a9d32c57956d41009bd09a1f33310676e (diff)
parent00fcdebed758f031b486ec239fd425fc54a180b3 (diff)
Merge pull request #762 from ThibG/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/workers')
-rw-r--r--app/workers/import_worker.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/app/workers/import_worker.rb b/app/workers/import_worker.rb
index d7c126f75..aeb221cf6 100644
--- a/app/workers/import_worker.rb
+++ b/app/workers/import_worker.rb
@@ -37,6 +37,8 @@ class ImportWorker
   end
 
   def import_rows
-    CSV.new(import_contents).reject(&:blank?)
+    rows = CSV.new(import_contents).reject(&:blank?)
+    rows = rows.take(FollowLimitValidator.limit_for_account(@import.account)) if @import.type == 'following'
+    rows
   end
 end