Folder: Add implementation for Update for nested folder (#58479)

* Add implementation for Update nested folder

* Remove parent uid from Update

* Fix update
This commit is contained in:
idafurjes
2022-11-10 14:28:55 +01:00
committed by GitHub
parent bd6ac793a0
commit 30f0d66983
8 changed files with 69 additions and 54 deletions
@@ -122,12 +122,6 @@ func (ss *sqlStore) Update(ctx context.Context, cmd folder.UpdateFolderCommand)
args = append(args, cmd.Folder.UID)
}
if cmd.NewParentUID != nil {
columnsToUpdate = append(columnsToUpdate, "parent_uid = ?")
cmd.Folder.ParentUID = *cmd.NewParentUID
args = append(args, cmd.Folder.UID)
}
if len(columnsToUpdate) == 0 {
return folder.ErrBadRequest.Errorf("no columns to update")
}