Skip to content

Commit

Permalink
[api] fix distinct select
Browse files Browse the repository at this point in the history
  • Loading branch information
coolo committed Sep 28, 2012
1 parent b29987b commit 7d6a05c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/lib/xpath_engine.rb
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,11 @@ def find(xpath, opt={})
when 'db_projects'
model = DbProject
if opt["render_all"]
select = "distinct(db_projects.id),db_projects.*"
includes = [:repositories]
else
includes = []
select = "distinct(db_projects.id,db_projects.name)"
select = "distinct(db_projects.id),db_projects.name"
end
when 'repositories'
model = Repository
Expand Down

0 comments on commit 7d6a05c

Please sign in to comment.