diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2019-12-15 01:30:01 +0800 |
---|---|---|
committer | Antoine GIRARD <sapk@users.noreply.github.com> | 2019-12-14 18:30:01 +0100 |
commit | 7b2ff82d209c01be8082eaa9b888f93a00850d4d (patch) | |
tree | e3876a3f5c4b204b97bb0b611493c27453204a2c /routers/repo/setting.go | |
parent | 2904abdc22da36a7110d0b69af0fd45cdb74ebf6 (diff) | |
download | gitea-7b2ff82d209c01be8082eaa9b888f93a00850d4d.tar.gz gitea-7b2ff82d209c01be8082eaa9b888f93a00850d4d.zip |
Move some repository methods from models to modules/repository (#9353)
* Move some repository methods from models to modules/repository
* fix test
Diffstat (limited to 'routers/repo/setting.go')
-rw-r--r-- | routers/repo/setting.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/repo/setting.go b/routers/repo/setting.go index a3650b1901..e5c2a9dbc6 100644 --- a/routers/repo/setting.go +++ b/routers/repo/setting.go @@ -20,6 +20,7 @@ import ( "code.gitea.io/gitea/modules/context" "code.gitea.io/gitea/modules/git" "code.gitea.io/gitea/modules/log" + "code.gitea.io/gitea/modules/repository" "code.gitea.io/gitea/modules/setting" "code.gitea.io/gitea/modules/timeutil" "code.gitea.io/gitea/modules/validation" @@ -338,7 +339,7 @@ func SettingsPost(ctx *context.Context, form auth.RepoSettingForm) { } repo.IsMirror = false - if _, err := models.CleanUpMigrateInfo(repo); err != nil { + if _, err := repository.CleanUpMigrateInfo(repo); err != nil { ctx.ServerError("CleanUpMigrateInfo", err) return } else if err = models.DeleteMirrorByRepoID(ctx.Repo.Repository.ID); err != nil { |