Fix https://github.com/go-gitea/gitea/pull/24530#issuecomment-1550227919
Co-authored-by: techknowlogick <techknowlogick@gitea.io>