File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -465,14 +465,13 @@ func Migrate(ctx *context.APIContext, form auth.MigrateRepoForm) {
465
465
}
466
466
}()
467
467
468
- _ , err = migrations .MigrateRepository (ctx .User , ctxUser .Name , opts )
469
- if err == nil {
470
- log .Trace ("Repository migrated: %s/%s" , ctxUser .Name , form .RepoName )
471
- ctx .JSON (201 , repo .APIFormat (models .AccessModeAdmin ))
468
+ if _ , err = migrations .MigrateRepository (ctx .User , ctxUser .Name , opts ); err != nil {
469
+ handleMigrateError (ctx , remoteAddr , err )
472
470
return
473
471
}
474
472
475
- handleMigrateError (ctx , remoteAddr , err )
473
+ log .Trace ("Repository migrated: %s/%s" , ctxUser .Name , form .RepoName )
474
+ ctx .JSON (201 , repo .APIFormat (models .AccessModeAdmin ))
476
475
}
477
476
478
477
func handleMigrateError (ctx * context.APIContext , remoteAddr string , err error ) {
You can’t perform that action at this time.
0 commit comments