Fixes: https://github.com/go-gitea/gitea/pull/6357
Signed-off-by: Cristian Staretu <[email protected]>