]> cat aescling's git repositories - mastodon.git/commitdiff
Fix directory showing tags that have no currently eligible accounts (#9872)
authorEugen Rochko <eugen@zeonfederated.com>
Sun, 20 Jan 2019 11:56:53 +0000 (12:56 +0100)
committerGitHub <noreply@github.com>
Sun, 20 Jan 2019 11:56:53 +0000 (12:56 +0100)
app/controllers/directories_controller.rb

index 96fe4c1c6ebc6a8dfead3b7ff53b62e48e1e7d0e..ff7ff4a428154fb8b178689a73339d47f8164155 100644 (file)
@@ -28,7 +28,7 @@ class DirectoriesController < ApplicationController
   end
 
   def set_tags
-    @tags = Tag.discoverable.limit(30)
+    @tags = Tag.discoverable.limit(30).reject { |tag| tag.cached_sample_accounts.empty? }
   end
 
   def set_accounts