diff --git a/actions/dataset.go b/actions/dataset.go index a92732676..bf2575298 100644 --- a/actions/dataset.go +++ b/actions/dataset.go @@ -249,11 +249,19 @@ func DeleteDataset(node *p2p.QriNode, ref *repo.DatasetRef) (err error) { return fmt.Errorf("given path does not equal most recent dataset path: cannot delete a specific save, can only delete entire dataset history. use `me/dataset_name` to delete entire dataset") } - // ds, err := dsfs.LoadDataset(r.Store(), datastore.NewKey(ref.Path)) + // TODO - this is causing bad things in our tests + // log, err := base.DatasetLog(r, *ref, 10000, 0, false) // if err != nil { // return err // } + // for _, ref := range log { + // time.Sleep(time.Millisecond * 50) + // if err = base.UnpinDataset(r, ref); err != nil { + // return err + // } + // } + if err = r.DeleteRef(*ref); err != nil { return err } diff --git a/api/datasets.go b/api/datasets.go index 2e667d364..158f4a93b 100644 --- a/api/datasets.go +++ b/api/datasets.go @@ -473,12 +473,10 @@ func (h *DatasetHandlers) saveHandler(w http.ResponseWriter, r *http.Request) { } } } else { - cleanup, err := dsutil.FormFileDataset(r, dsp) - if err != nil { + if err := dsutil.FormFileDataset(r, dsp); err != nil { util.WriteErrResponse(w, http.StatusBadRequest, err) return } - defer cleanup() } res := &repo.DatasetRef{} diff --git a/base/dataset_prepare.go b/base/dataset_prepare.go index 95597bbad..b3b98106f 100644 --- a/base/dataset_prepare.go +++ b/base/dataset_prepare.go @@ -89,15 +89,8 @@ func PrepareDatasetNew(dsp *dataset.DatasetPod) (ds *dataset.Dataset, body cafs. return } - // NOTE - if we have a data file, this overrides any transformation, - // so we need to remove the transform to avoid having the data appear to be - // the result of a transform process - ds.Transform = nil - } else if err.Error() == "not found" { err = nil - } else { - return } return