ckanext-doi icon indicating copy to clipboard operation
ckanext-doi copied to clipboard

CKAN background jobs will throw an exception when publishing DOI

Open MarkCalvert opened this issue 11 months ago • 0 comments

Description CKAN background jobs can update datasets (e.g. embargo releases), which trigger the after_dataset_update interface. Flash messages will fail in background jobs and only work from web requests.

Expected Behaviour No exceptions thrown when a DOI is published from a CKAN background job.

To Reproduce Create a CKAN background job to update a dataset from private to public

Error Log Paste any relevant error logs below:

Working outside of request context

Your Setup

  • CKAN version: [e.g. 2.10.3]

Anything Else? Proposed solution https://github.com/NaturalHistoryMuseum/ckanext-doi/pull/102

MarkCalvert avatar Mar 15 '24 02:03 MarkCalvert