From c5a0a2f914664f58ebd61c42808a190d6c8a1102 Mon Sep 17 00:00:00 2001 From: Ian Ward Date: Mon, 27 Jan 2025 16:57:24 -0500 Subject: [PATCH] Avoid loading R/W datastore resources Fix for compatibility with CKAN Table Designer feature --- ckanext/xloader/jobs.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ckanext/xloader/jobs.py b/ckanext/xloader/jobs.py index aa23fb86..aac2413a 100644 --- a/ckanext/xloader/jobs.py +++ b/ckanext/xloader/jobs.py @@ -19,7 +19,7 @@ import sqlalchemy as sa from ckan import model -from ckan.plugins.toolkit import get_action, asbool, enqueue_job, ObjectNotFound, config +from ckan.plugins.toolkit import get_action, asbool, enqueue_job, ObjectNotFound, config, h from . import db, loader from .job_exceptions import JobError, HTTPError, DataTooBigError, FileCouldNotBeLoadedError @@ -178,8 +178,8 @@ def xloader_data_into_datastore_(input, job_dict, logger): logger.info('Express Load starting: %s', resource_ckan_url) # check if the resource url_type is a datastore - if resource.get('url_type') == 'datastore': - logger.info('Ignoring resource - url_type=datastore - dump files are ' + if resource.get('url_type') in h.datastore_rw_resource_url_types(): + logger.info('Ignoring resource - R/W DataStore resources are ' 'managed with the Datastore API') return