0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-04-04 03:35:05 +02:00

fix build errors

This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧ 2025-12-20 16:23:11 -05:00
parent 11f32528c6
commit ea0340933d
No known key found for this signature in database
GPG Key ID: 924A5F6AF051E87C
2 changed files with 4 additions and 4 deletions

View File

@ -238,7 +238,7 @@ func MigratePost(ctx *context.Context) {
opts.AWSSecretAccessKey = form.AWSSecretAccessKey
}
err = repo_service.CheckCreateRepository(ctx, ctx.Doer, ctxUser, opts.RepoName, false)
err = repo_service.CheckCreateRepository(ctx, ctx.Doer, ctxUser, opts.RepoName, 0, false)
if err != nil {
handleMigrateError(ctx, ctxUser, err, "MigratePost", tpl, form)
return

View File

@ -308,7 +308,7 @@ func HasWiki(ctx context.Context, repo *repo_model.Repository) bool {
}
// CheckCreateRepository check if doer could create a repository in new owner
func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, name string, overwriteOrAdopt bool) error {
func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, name string, gid int64, overwriteOrAdopt bool) error {
if !doer.CanCreateRepoIn(owner) {
return repo_model.ErrReachLimitOfRepo{Limit: owner.MaxRepoCreation}
}
@ -317,13 +317,13 @@ func CheckCreateRepository(ctx context.Context, doer, owner *user_model.User, na
return err
}
has, err := repo_model.IsRepositoryModelExist(ctx, owner, name)
has, err := repo_model.IsRepositoryModelExist(ctx, owner, name, gid)
if err != nil {
return err
} else if has {
return repo_model.ErrRepoAlreadyExist{Uname: owner.Name, Name: name}
}
repo := repo_model.StorageRepo(repo_model.RelativePath(owner.Name, name))
repo := repo_model.StorageRepo(repo_model.RelativePath(owner.Name, name, gid))
isExist, err := gitrepo.IsRepositoryExist(ctx, repo)
if err != nil {
log.Error("Unable to check if %s exists. Error: %v", repo.RelativePath(), err)