Commit 822129b6 authored by Małgorzata Ksionek's avatar Małgorzata Ksionek

Change sql query

parent 5ce4236b
......@@ -18,9 +18,9 @@ module Gitlab
private
def find_deployments
deployments = Deployment.joins(:project)
.where(projects: { id: projects.ids })
.where("deployments.created_at > ?", from)
deployments = Deployment.joins(:project).merge(Project.inside_path(group.full_path))
deployments = deployments.where(projects: { id: options[:projects] }) if options[:projects]
deployments = deployments.where("deployments.created_at > ?", from)
deployments.success.count
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment