hubmapconsortium / ingest-ui

HuBMAP Data Ingest Portal
https://ingest.hubmapconsortium.org
MIT License
4 stars 0 forks source link

Omit `dataset_type` from Dataset editing PUT call #1322

Closed yuanzhou closed 6 months ago

yuanzhou commented 7 months ago

Since we disallow editing the dataset_type on an existing dataset, this filed should be excluded from the PUT call against entity-api when the user saves the updated info.

Screenshot 2024-01-31 at 11 45 58 AM

Leaving this field in the request could also cause issues when the dataset type is not supported by the backend.

{
    "error": "400 Bad Request: Proposed Dataset dataset_type 'DARTfish' is not recognized in the existing ontology. Valid values are: ['Cell DIVE', 'CODEX', 'Light Sheet', 'MIBI', 'LC-MS', 'HiFi-Slide', 'Histology', 'PhenoCycler', 'CyCIF', 'MALDI', 'SIMS', 'DESI', 'Auto-fluorescence', 'Confocal', 'Thick section Multiphoton MxIF', 'Second Harmonic Generation (SHG)', 'Enhanced Stimulated Raman Spectroscopy (SRS)', '10X Multiome', 'Molecular Cartography', 'CosMx', 'Xenium', 'MERFISH', 'DBiT', 'SNARE-seq2', '2D Imaging Mass Cytometry', 'GeoMx (NGS)', 'Visium (no probes)', 'Visium (with probes)', 'ATACseq', 'RNAseq', 'RNAseq (with probes)', 'nanoSPLITS', 'GeoMx (nCounter)']."
}

Or when the type is "UNKNOWN":

Screenshot 2024-01-31 at 11 56 54 AM