### Description When a user deletes their account, they become a `Ghost` account. Such a user may already have logged time on issues.  In such a case, the following web API endpoints return 500. * GET `/repos/{owner}/{repo}/issues/{index}/times` * GET `/repos/{owner}/{repo}/times` Other endpoints may also be affected, but our scripts did only ran into trouble here. In particular not affected is `GET /repos/{owner}/{repo}/times/{user}` as long as user is not the id of a deleted user. ### Gitea Version 1.17.2 ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version _No response_ ### Operating System _No response_ ### How are you running Gitea? We are running Gitea with docker from ` image: gitea/gitea:1.17.2`. Gitea DB is `mariadb:10.9.2`. The web API is behind a traefik reverse proxy. ### Database MySQL