opened 12:25PM - 17 Aug 22 UTC
kind/bug
### Description
After upgrading from 1.12.6 to 1.17.0, I'm running into an issu…e where any mergable PRs result in server error 500s. Merged PRs and WIP PRs display normally.
Relevant log lines:
```
2022/08/17 10:58:16 ...vices/pull/update.go:109:IsUserAllowedToUpdate() [E] [62fcc9c8] pr.BaseRepo.GetUnit(unit.TypePullRequests): Unit type does not exist: TypePullRequests
2022/08/17 10:58:16 ...ers/web/repo/pull.go:509:PrepareViewPullInfo() [E] [62fcc9c8] IsUserAllowedToUpdate: Unit type does not exist: TypePullRequests
```
I followed to recommended upgrade procedure (and also removed any custom templates we had in use previously). The upgrade seems to have gone OK otherwise. `gitea doctor` also doesn't show anything wrong.
If possible, a "quick fix" as a workaround for this error would be appreciated as we're currently unable to perform any merges in gitea which is a showstopper.
### Gitea Version
1.17.0
### Can you reproduce the bug on the Gitea demo site?
No
### Log Gist
_No response_
### Screenshots
_No response_
### Git Version
2.37.1
### Operating System
CentOS Linux 7.9.2009
### How are you running Gitea?
From binary downloaded from gitea.io
### Database
MySQL