OSDN Git Service

update Restore
authorChengcheng Zhang <943420582@qq.com>
Tue, 2 Jul 2019 08:21:32 +0000 (16:21 +0800)
committerChengcheng Zhang <943420582@qq.com>
Tue, 2 Jul 2019 08:21:32 +0000 (16:21 +0800)
account/image.go

index 14ad269..4477cb3 100644 (file)
@@ -49,8 +49,8 @@ func (m *Manager) Restore(image *Image) error {
        }
 
        for _, slice := range image.Slice {
-               existed, err := m.store.GetAccountByID(slice.Account.ID)
-               if err != nil || existed != nil {
+               _, err := m.store.GetAccountByID(slice.Account.ID)
+               if err != nil {
                        log.WithFields(log.Fields{
                                "module": logModule,
                                "alias":  slice.Account.Alias,