Skip to content

Commit bc39ef1

Browse files
committed
fix(dev): 2.9 support;
- Do not use 2.10+ helper.
1 parent 383f45c commit bc39ef1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ckanext/xloader/plugin.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def notify(self, entity, operation):
8686
# extension will call resource_patch and this method should
8787
# be called again. However, url_changed will not be in the entity
8888
# once Validation does the patch.
89-
if toolkit.h.plugin_loaded('validation') and \
89+
if 'validation' in toolkit.config.get('ckan.plugins', []) and \
9090
toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')):
9191
if entity.__dict__.get('extras', {}).get('validation_status', None) != 'success':
9292
log.debug("Skipping xloading resource %s because "
@@ -109,7 +109,7 @@ def notify(self, entity, operation):
109109
# IResourceController
110110

111111
def after_resource_create(self, context, resource_dict):
112-
if toolkit.h.plugin_loaded('validation') and \
112+
if 'validation' in toolkit.config.get('ckan.plugins', []) and \
113113
toolkit.asbool(toolkit.config.get('ckanext.xloader.requires_validation')) and \
114114
resource_dict.get('validation_status', None) != 'success':
115115
log.debug("Skipping xloading resource %s because "

0 commit comments

Comments
 (0)