Avoid cache building for super-weird case when repository root_ref is nil
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
This commit is contained in:
parent
f0116f1335
commit
67654a44d1
|
@ -7,6 +7,9 @@ class ProjectCacheWorker
|
||||||
project = Project.find(project_id)
|
project = Project.find(project_id)
|
||||||
project.update_repository_size
|
project.update_repository_size
|
||||||
project.update_commit_count
|
project.update_commit_count
|
||||||
|
|
||||||
|
if project.repository.root_ref
|
||||||
project.repository.build_cache
|
project.repository.build_cache
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue