Fixing import redirect loop

While importing, don't redirect import actions to the project page, even if the repository exists
This commit is contained in:
DJ Mountney 2015-03-09 16:36:41 -07:00
parent e89ffd546e
commit 23fabc081d

View file

@ -37,7 +37,7 @@ class Projects::ImportsController < Projects::ApplicationController
private
def require_no_repo
if @project.repository_exists?
if @project.repository_exists? && !@project.import_in_progress?
redirect_to(namespace_project_path(@project.namespace, @project)) and return
end
end