Skip to content

Commit

Permalink
compatibility with ckan 2.10 and older from @duttonw
Browse files Browse the repository at this point in the history
  • Loading branch information
wardi authored Jan 28, 2025
1 parent c5a0a2f commit 8eda56d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion ckanext/xloader/jobs.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,13 @@ 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') in h.datastore_rw_resource_url_types():
if hasattr(h, "datastore_rw_resource_url_types"):
datastore_rw_resource_url_types = h.datastore_rw_resource_url_types()
else:
#fallback for 2.10.x or older.
datastore_rw_resource_url_types = ['datastore']

if resource.get('url_type') in datastore_rw_resource_url_types:
logger.info('Ignoring resource - R/W DataStore resources are '
'managed with the Datastore API')
return
Expand Down

0 comments on commit 8eda56d

Please sign in to comment.