[ckan-changes] [ckan/ckan] 02c10a: Deleting a dataset now also deletes its resources

David Read noreply at github.com
Fri Jul 12 20:07:45 UTC 2019


  Branch: refs/heads/deleting-a-dataset-deletes-its-resources
  Home:   https://github.com/ckan/ckan
  Commit: 02c10a45221700c4a48e2a9546c6ea1775129db5
      https://github.com/ckan/ckan/commit/02c10a45221700c4a48e2a9546c6ea1775129db5
  Author: David Read <david.read at hackneyworkshop.com>
  Date:   2019-07-12 (Fri, 12 Jul 2019)

  Changed paths:
    M ckan/logic/action/delete.py
    M ckan/tests/logic/action/test_delete.py
    M ckanext/example_iresourcecontroller/tests/test_example_iresourcecontroller.py

  Log Message:
  -----------
  Deleting a dataset now also deletes its resources

Fixes #4705

@dassolkim is concerned that IResourceController.before_delete event is
not firing at any point when a dataset is deleted and then purged
(either with package_purge or the admin.Trash page). PR #4867 seeks to
implement the event in the admin.Trash page. But this PR proposes the
alternative, which is to actually delete the resource when the dataset
is deleted and fire the event then.

It seems an anomaly that we don't delete resources with the dataset. It
makes sense that the dataset and resources are both state=deleted.
However there is an argument that we shouldn't, because a sysadmin can still
see the deleted dataset, but with this PR it will have no resources.




More information about the ckan-changes mailing list