Commit 1ffce294 authored by James Lopez's avatar James Lopez

fix project import with mirror enabled

parent 1bf2cfbb
......@@ -379,14 +379,6 @@ class Project < ActiveRecord::Base
end
def add_import_job
if repository_exists?
if mirror?
RepositoryUpdateMirrorWorker.perform_async(self.id)
end
return
end
if forked?
job_id = RepositoryForkWorker.perform_async(self.id, forked_from_project.path_with_namespace, self.namespace.path)
else
......@@ -500,7 +492,7 @@ class Project < ActiveRecord::Base
end
def update_mirror
return unless mirror?
return unless mirror? && repository_exists?
return if import_in_progress?
......@@ -508,6 +500,7 @@ class Project < ActiveRecord::Base
import_retry
else
import_start
RepositoryUpdateMirrorWorker.perform_async(self.id)
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