diff --git a/lib/noosfero/api/v1/search.rb b/lib/noosfero/api/v1/search.rb index 67a741c..572871b 100644 --- a/lib/noosfero/api/v1/search.rb +++ b/lib/noosfero/api/v1/search.rb @@ -18,7 +18,7 @@ module Noosfero scope = scope.where(:type => params[:type]) if params[:type] && !(params[:type] == 'Article') scope = scope.where(make_conditions_with_parameter(params)) scope = scope.joins(:categories).where(:categories => {:id => params[:category_ids]}) if params[:category_ids].present? - scope = scope.where('children_count > 0') if params[:has_children].present? + scope = scope.where('articles.children_count > 0') if params[:has_children].present? query = params[:query] || "" order = "more_recent" -- libgit2 0.21.2