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

Change sql query

parent 5ce4236b
...@@ -18,9 +18,9 @@ module Gitlab ...@@ -18,9 +18,9 @@ module Gitlab
private private
def find_deployments def find_deployments
deployments = Deployment.joins(:project) deployments = Deployment.joins(:project).merge(Project.inside_path(group.full_path))
.where(projects: { id: projects.ids }) deployments = deployments.where(projects: { id: options[:projects] }) if options[:projects]
.where("deployments.created_at > ?", from) deployments = deployments.where("deployments.created_at > ?", from)
deployments.success.count deployments.success.count
end end
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