summaryrefslogtreecommitdiffstats
path: root/services/repository/adopt.go
diff options
context:
space:
mode:
Diffstat (limited to 'services/repository/adopt.go')
-rw-r--r--services/repository/adopt.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/services/repository/adopt.go b/services/repository/adopt.go
index b287d94f9d..1e8c22a479 100644
--- a/services/repository/adopt.go
+++ b/services/repository/adopt.go
@@ -208,7 +208,7 @@ func DeleteUnadoptedRepository(doer, u *user_model.User, repoName string) error
}
}
- if exist, err := repo_model.IsRepositoryExist(u, repoName); err != nil {
+ if exist, err := repo_model.IsRepositoryExist(db.DefaultContext, u, repoName); err != nil {
return err
} else if exist {
return repo_model.ErrRepoAlreadyExist{
@@ -238,7 +238,7 @@ func checkUnadoptedRepositories(userName string, repoNamesToCheck []string, unad
if len(repoNamesToCheck) == 0 {
return nil
}
- ctxUser, err := user_model.GetUserByName(userName)
+ ctxUser, err := user_model.GetUserByName(db.DefaultContext, userName)
if err != nil {
if user_model.IsErrUserNotExist(err) {
log.Debug("Missing user: %s", userName)