Skip to content
Snippets Groups Projects
Commit 17de909a authored by Kamil Trzcińśki's avatar Kamil Trzcińśki
Browse files

Fix broken grouping sql clause when rendering commits for CI

parent 59058a25
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -14,9 +14,10 @@ module Ci
def show
@ref = params[:ref]
 
@commits = @project.commits.group(:sha).reverse_order
@commits = @project.commits.reverse_order
if @ref
builds = @project.builds.where(ref: @ref).select(:commit_id).distinct
# unscope is required, because of default_scope defined in Ci::Build
builds = @project.builds.unscope(:select, :order).where(ref: @ref).select(:commit_id).distinct
@commits = @commits.where(id: builds)
end
@commits = @commits.page(params[:page]).per(20)
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment