From d3b5575cae625b0a00d92be119353dd768909b9f Mon Sep 17 00:00:00 2001 From: Victor Costa Date: Fri, 18 Dec 2015 13:31:01 -0300 Subject: [PATCH] api: fix ambiguity with children_count in article search --- lib/noosfero/api/v1/search.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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