From 028e42bf9222f798668059fa0fea0b1973636d01 Mon Sep 17 00:00:00 2001 From: Jesse Vickery Date: Fri, 24 Nov 2023 20:00:35 +0000 Subject: [PATCH] fix(dev): 2.9 support; - Do not use 2.10+ helper. --- ckanext/xloader/plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckanext/xloader/plugin.py b/ckanext/xloader/plugin.py index 232554b4..41e6f58e 100644 --- a/ckanext/xloader/plugin.py +++ b/ckanext/xloader/plugin.py @@ -116,7 +116,7 @@ def notify(self, entity, operation): # extension will call resource_patch and this method should # be called again. However, url_changed will not be in the entity # once Validation does the patch. - if toolkit.h.plugin_loaded('validation') and \ + if 'validation' in toolkit.config.get('ckan.plugins', []) and \ toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')): if entity.__dict__.get('extras', {}).get('validation_status', None) != 'success': log.debug("Skipping xloading resource %s because " @@ -139,7 +139,7 @@ def notify(self, entity, operation): # IResourceController def after_resource_create(self, context, resource_dict): - if toolkit.h.plugin_loaded('validation') and \ + if 'validation' in toolkit.config.get('ckan.plugins', []) and \ toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')) and \ resource_dict.get('validation_status', None) != 'success': log.debug("Skipping xloading resource %s because "