Error 500 on public project with empty team-only-repository
Summary
Error 500.
Steps to reproduce
Create public project
Restrict repository access to Team-Only
Let everything else public
Access repository in incognito-mode -> E500
Expected behavior
Redirect to Wiki or default page (showing empty Readme).
Actual behavior
Error 500.
Relevant logs and/or screenshots
A link to erroring project: https://gitlab.com/AliveDevil/E500Reprod (hint: it's empty)