Change sql query

This commit is contained in:
Małgorzata Ksionek 2019-07-23 22:00:50 +02:00
parent 5ce4236b66
commit 822129b6b7
1 changed files with 3 additions and 3 deletions

View File

@ -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