Commit 9efcdbc1a31df65f59bd80ad4b9e3696aedd67f6
1 parent
481d59ae
Exists in
master
and in
2 other branches
Fix bug in visible_profiles of CommunitiesBlock
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/ext/communities_block.rb
@@ -22,7 +22,7 @@ class CommunitiesBlock | @@ -22,7 +22,7 @@ class CommunitiesBlock | ||
22 | valid_communities_string = Community.get_valid_communities_string | 22 | valid_communities_string = Community.get_valid_communities_string |
23 | Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} | 23 | Community.all.each{|community| delete_communities << community.id unless eval(valid_communities_string)} |
24 | 24 | ||
25 | - visible_profiles = visible_profiles.where(["profiles.id NOT IN (?)", delete_communities]) | 25 | + visible_profiles = visible_profiles.where(["profiles.id NOT IN (?)", delete_communities]) unless delete_communities.empty? |
26 | 26 | ||
27 | if !prioritize_profiles_with_image | 27 | if !prioritize_profiles_with_image |
28 | return visible_profiles.all( | 28 | return visible_profiles.all( |