ckan/ckanext-harvest

Error in harvest_source_list after deleting a harvest source

bzar opened this issue · 1 comments

bzar commented
  1. Create a harvest source
  2. Delete the harvest source
  3. Call harvest_source_list action with return_last_job_status=False
  4. Everything works, the deleted source is included
  5. Call harvest_source_list action with return_last_job_status=True
  6. ckan.logic.NotAuthorized: User None not authorized to read harvest source f00babab-41a8-4167-98f6-1ebe295c23bb from harvest_source_show_status

I'd provide a PR but I'm not exactly sure how the issue should be resolved. For example:

  1. Skip sources that fail authorization
  2. Skip deleted sources
  3. Provide a placeholder status for deleted sources

I vote for:
2. Skip deleted sources