Commit d3b5575cae625b0a00d92be119353dd768909b9f
1 parent
3a07ccbb
Exists in
theme-brasil-digital-from-staging
and in
3 other branches
api: fix ambiguity with children_count in article search
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/noosfero/api/v1/search.rb
| ... | ... | @@ -18,7 +18,7 @@ module Noosfero |
| 18 | 18 | scope = scope.where(:type => params[:type]) if params[:type] && !(params[:type] == 'Article') |
| 19 | 19 | scope = scope.where(make_conditions_with_parameter(params)) |
| 20 | 20 | scope = scope.joins(:categories).where(:categories => {:id => params[:category_ids]}) if params[:category_ids].present? |
| 21 | - scope = scope.where('children_count > 0') if params[:has_children].present? | |
| 21 | + scope = scope.where('articles.children_count > 0') if params[:has_children].present? | |
| 22 | 22 | query = params[:query] || "" |
| 23 | 23 | order = "more_recent" |
| 24 | 24 | ... | ... |