Prevent empty public projects from throwing exceptions

Created by: karlhungus

To reproduce the bug prior to this patch, create an empty repository, make it public, and visit it from the public projects page, it should take you to the 500 error page.

合并请求报告