diff options
Diffstat (limited to 'modules/task/task.go')
-rw-r--r-- | modules/task/task.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/task/task.go b/modules/task/task.go index 4e782869f9..51377df78c 100644 --- a/modules/task/task.go +++ b/modules/task/task.go @@ -90,7 +90,7 @@ func CreateMigrateTask(doer, u *models.User, opts base.MigrateOptions) (*models. return nil, err } - var task = models.Task{ + var task = &models.Task{ DoerID: doer.ID, OwnerID: u.ID, Type: structs.TaskTypeMigrateRepo, @@ -98,7 +98,7 @@ func CreateMigrateTask(doer, u *models.User, opts base.MigrateOptions) (*models. PayloadContent: string(bs), } - if err := models.CreateTask(&task); err != nil { + if err := models.CreateTask(task); err != nil { return nil, err } @@ -126,5 +126,5 @@ func CreateMigrateTask(doer, u *models.User, opts base.MigrateOptions) (*models. return nil, err } - return &task, nil + return task, nil } |