Fix https://github.com/go-gitea/gitea/issues/31427 (cherry picked from commit 17b3a38577d6e1d50ba5565ca3b1f2f57a04bf32)
db.DefaultContext