data.gov icon indicating copy to clipboard operation
data.gov copied to clipboard

disallow deletion of parent dataset within a Collection

Open Jin-Sun-tts opened this issue 1 year ago • 4 comments

How to reproduce

Related #4553

in the local environment, find a collection and run ckan dataset purge/delete <collection_package_id>.

Expected behavior

The expected behavior is that for a collection, it should not be allowed to delete a parent dataset if there are still children datasets associated with it.

Actual behavior

The actual behavior observed is that parent datasets were deleted even when there were other datasets within the same collection.

Sketch

To address this issue, we need to implement logic at the delete stage. If a collection contains children datasets, the system should prevent the deletion of the parent dataset. This will ensure that parent datasets are retained as long as they have associated children datasets.

Jin-Sun-tts avatar Jan 24 '24 16:01 Jin-Sun-tts