Commit 0844039f9d0b0ae0b2202f74fa37e9d0c54b157e

Authored by Luciano Prestes
1 parent 1d4adca8

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(