Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
HyunjunA committed Oct 4, 2023
2 parents bb926c8 + 949d678 commit 6b27b4e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lab/lab.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,10 @@ app.delete('/api/v1/datasets/:id', async (req, res, next) => {
if (dataset == null) {
return res.status(404).send({ message: 'dataset ' + req.params.id + ' not found'});
}

if (dataset.ai && (dataset.ai.status == recommenderStatus.RUNNING || dataset.ai.status == recommenderStatus.INITIALIZING)) {
return res.status(409).send({message: 'cannot delete dataset, recommender running'});
}

const dataset_file_id = db.toObjectID(dataset.files[0]._id);
files.push(...dataset.files);
Expand Down

0 comments on commit 6b27b4e

Please sign in to comment.