Commit 9d7ae0e230c5530ae938933af17265de74c9dd2b
1 parent
47b59b20
Exists in
master
and in
29 other branches
Fix communities listing when sub_organizations plugin is enabled
Some count queries breaks when there is a join with other entity.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
app/controllers/public/profile_controller.rb
... | ... | @@ -51,7 +51,7 @@ class ProfileController < PublicController |
51 | 51 | |
52 | 52 | def communities |
53 | 53 | if is_cache_expired?(profile.communities_cache_key(params)) |
54 | - @communities = profile.communities.includes(relations_to_include).paginate(:per_page => per_page, :page => params[:npage]) | |
54 | + @communities = profile.communities.includes(relations_to_include).paginate(:per_page => per_page, :page => params[:npage], :total_entries => profile.communities.count) | |
55 | 55 | end |
56 | 56 | end |
57 | 57 | ... | ... |