Fixes: https://github.com/go-gitea/gitea/pull/6357
Signed-off-by: Cristian Staretu <cristian.staretu@gmail.com>