diff --git a/ckanext/versions/helpers.py b/ckanext/versions/helpers.py index d63af0e..1f1b0d1 100644 --- a/ckanext/versions/helpers.py +++ b/ckanext/versions/helpers.py @@ -20,3 +20,11 @@ def get_package_version_list(package_id): return version_list +def scheming_plugin_enabled(): + """ + Check if the scheming plugin is enabled. + :return: True if the scheming plugin is enabled, False otherwise + """ + if 'scheming_datasets' in tk.config.get('ckan.plugins', ' '): + return True + return False \ No newline at end of file diff --git a/ckanext/versions/plugin.py b/ckanext/versions/plugin.py index 3b17aa0..2e9c31f 100644 --- a/ckanext/versions/plugin.py +++ b/ckanext/versions/plugin.py @@ -60,6 +60,7 @@ def get_validators(self): def get_helpers(self): return { "get_package_version_list": helpers.get_package_version_list, + "scheming_plugin_enabled": helpers.scheming_plugin_enabled, } # IBlueprints