refactor: simplify success response in dataset API endpoints by returning status code 204 directly (#19685)

This commit is contained in:
GuanMu
2025-05-14 18:44:35 +08:00
committed by GitHub
parent 79015bf8d9
commit 17b929124f
3 changed files with 4 additions and 4 deletions

View File

@@ -313,7 +313,7 @@ class DatasetApi(DatasetApiResource):
try:
if DatasetService.delete_dataset(dataset_id_str, current_user):
DatasetPermissionService.clear_partial_member_list(dataset_id_str)
return {"result": "success"}, 204
return 204
else:
raise NotFound("Dataset not found.")
except services.errors.dataset.DatasetInUseError: