mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 18:02:28 +02:00
Delete related PullAutoMerge and ReviewState on User/Repo Deletion (#19649)
* delete pullautomerges on repo/user deletion * delete reviewstates on repo/user deletion * optimize automerhe code * add index to reviewstate
This commit is contained in:
parent
4344a64107
commit
6a969681cd
17 changed files with 124 additions and 95 deletions
|
@ -9,6 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"code.gitea.io/gitea/models"
|
||||
"code.gitea.io/gitea/models/db"
|
||||
"code.gitea.io/gitea/modules/context"
|
||||
"code.gitea.io/gitea/modules/util"
|
||||
"code.gitea.io/gitea/modules/web"
|
||||
|
@ -63,7 +64,7 @@ func DeleteTime(c *context.Context) {
|
|||
|
||||
t, err := models.GetTrackedTimeByID(c.ParamsInt64(":timeid"))
|
||||
if err != nil {
|
||||
if models.IsErrNotExist(err) {
|
||||
if db.IsErrNotExist(err) {
|
||||
c.NotFound("time not found", err)
|
||||
return
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue