Skip to content

Commit

Permalink
fix(dev): 2.9 support;
Browse files Browse the repository at this point in the history
- Do not use 2.10+ helper.
  • Loading branch information
JVickery-TBS committed Nov 24, 2023
1 parent a97f4ad commit 028e42b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ckanext/xloader/plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 "
Expand All @@ -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 "
Expand Down

0 comments on commit 028e42b

Please sign in to comment.