summaryrefslogtreecommitdiffstats
path: root/models/issue_tracked_time.go
diff options
context:
space:
mode:
author6543 <6543@obermui.de>2022-05-08 15:46:34 +0200
committerGitHub <noreply@github.com>2022-05-08 15:46:34 +0200
commit6a969681cd862bf153fa7921485278be1e8a092a (patch)
treef9a23ee85652c0ee179f215b23d928058176ae6c /models/issue_tracked_time.go
parent4344a6410788f30848e5153f6356dcdd0774bebc (diff)
downloadgitea-6a969681cd862bf153fa7921485278be1e8a092a.tar.gz
gitea-6a969681cd862bf153fa7921485278be1e8a092a.zip
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
Diffstat (limited to 'models/issue_tracked_time.go')
-rw-r--r--models/issue_tracked_time.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/models/issue_tracked_time.go b/models/issue_tracked_time.go
index e675c79193..76ff874c59 100644
--- a/models/issue_tracked_time.go
+++ b/models/issue_tracked_time.go
@@ -251,7 +251,7 @@ func DeleteIssueUserTimes(issue *Issue, user *user_model.User) error {
return err
}
if removedTime == 0 {
- return ErrNotExist{}
+ return db.ErrNotExist{}
}
if err := issue.LoadRepo(ctx); err != nil {
@@ -311,7 +311,7 @@ func deleteTimes(e db.Engine, opts FindTrackedTimesOptions) (removedTime int64,
func deleteTime(e db.Engine, t *TrackedTime) error {
if t.Deleted {
- return ErrNotExist{ID: t.ID}
+ return db.ErrNotExist{ID: t.ID}
}
t.Deleted = true
_, err := e.ID(t.ID).Cols("deleted").Update(t)
@@ -325,7 +325,7 @@ func GetTrackedTimeByID(id int64) (*TrackedTime, error) {
if err != nil {
return nil, err
} else if !has {
- return nil, ErrNotExist{ID: id}
+ return nil, db.ErrNotExist{ID: id}
}
return time, nil
}