Fix project search during auto_build action. Refs #2162
This commit is contained in:
parent
ae6919a240
commit
96e223d0eb
|
@ -55,8 +55,9 @@ class ProjectsController < ApplicationController
|
||||||
end
|
end
|
||||||
|
|
||||||
def auto_build
|
def auto_build
|
||||||
unixname = params[:git_repo].split('/').last
|
uname, unixname = params[:git_repo].split('/')
|
||||||
project = Project.find_by_unixname(unixname)
|
owner = User.find_by_uname(uname) || Group.find_by_uname(uname)
|
||||||
|
project = Project.where(:owner_id => owner.id, :owner_type => owner.class).find_by_unixname!(unixname)
|
||||||
auto_build_list = AutoBuildList.find_by_project_id(project.id)
|
auto_build_list = AutoBuildList.find_by_project_id(project.id)
|
||||||
|
|
||||||
# p = params.delete_if{|k,v| k == 'controller' or k == 'action'}
|
# p = params.delete_if{|k,v| k == 'controller' or k == 'action'}
|
||||||
|
|
Loading…
Reference in New Issue