Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
17de909a
Коммит
17de909a
создал
Окт 06, 2015
по автору
Kamil Trzcinski
Просмотр файлов
Fix broken grouping sql clause when rendering commits for CI
владелец
59058a25
Изменения
1
Скрыть пробелы
Построчно
Рядом
app/controllers/ci/projects_controller.rb
Просмотр файла @
17de909a
...
...
@@ -14,9 +14,10 @@ class ProjectsController < Ci::ApplicationController
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
)
...
...
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать