diff --git a/ckanext/harvest/logic/action/update.py b/ckanext/harvest/logic/action/update.py index 02eae72..36395fb 100644 --- a/ckanext/harvest/logic/action/update.py +++ b/ckanext/harvest/logic/action/update.py @@ -154,6 +154,10 @@ def harvest_source_clear(context,data_dict): delete from package_revision where id in (select id from package where state = 'to_delete'); delete from package_tag where package_id in (select id from package where state = 'to_delete'); delete from package_extra where package_id in (select id from package where state = 'to_delete'); + delete from package_relationship_revision where subject_package_id in (select id from package where state = 'to_delete'); + delete from package_relationship_revision where object_package_id in (select id from package where state = 'to_delete'); + delete from package_relationship where subject_package_id in (select id from package where state = 'to_delete'); + delete from package_relationship where object_package_id in (select id from package where state = 'to_delete'); delete from member where table_id in (select id from package where state = 'to_delete'); delete from related_dataset where dataset_id in (select id from package where state = 'to_delete'); delete from related where id in {related_ids};