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:
@@ -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")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user