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
1 changed files with 4 additions and 1 deletions
|
@ -7,6 +7,9 @@ class ProjectCacheWorker
|
|||
project = Project.find(project_id)
|
||||
project.update_repository_size
|
||||
project.update_commit_count
|
||||
project.repository.build_cache
|
||||
|
||||
if project.repository.root_ref
|
||||
project.repository.build_cache
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue