aboutsummaryrefslogtreecommitdiffstats
path: root/models/repo.go
diff options
context:
space:
mode:
authorwxiaoguang <wxiaoguang@gmail.com>2022-10-16 18:44:16 +0800
committerGitHub <noreply@github.com>2022-10-16 18:44:16 +0800
commit6f48a36227b7427afd2020aa416afe49d4c81015 (patch)
treeacf275dd1daec784c756014d6aba0225fb60558f /models/repo.go
parent0647df3e831c320436d42a5572a6ec6a9d23d8b1 (diff)
downloadgitea-6f48a36227b7427afd2020aa416afe49d4c81015.tar.gz
gitea-6f48a36227b7427afd2020aa416afe49d4c81015.zip
Refactor GetNextResourceIndex to make it work properly with transaction (#21469)
Related: * #21362 This PR uses a general and stable method to generate resource index (eg: Issue Index, PR Index) If the code looks good, I can add more tests ps: please skip the diff, only have a look at the new code. It's entirely re-written. Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Diffstat (limited to 'models/repo.go')
-rw-r--r--models/repo.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/models/repo.go b/models/repo.go
index 558678bfe5..94e6249842 100644
--- a/models/repo.go
+++ b/models/repo.go
@@ -163,7 +163,7 @@ func DeleteRepository(doer *user_model.User, uid, repoID int64) error {
}
// Delete issue index
- if err := db.DeleteResouceIndex(ctx, "issue_index", repoID); err != nil {
+ if err := db.DeleteResourceIndex(ctx, "issue_index", repoID); err != nil {
return err
}