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:
Dmitriy Zaporozhets 2015-07-17 16:03:38 +02:00
parent f0116f1335
commit 67654a44d1
No known key found for this signature in database
GPG key ID: 161B5D6A44D3D88A

View file

@ -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