From e6d859b8dbd732c82ac3cc84d5584dec507a92a9 Mon Sep 17 00:00:00 2001 From: Sagar Ghimire Date: Thu, 5 Jun 2025 07:24:42 +0545 Subject: [PATCH] fix: helper function not found bug fix --- ckanext/versions/helpers.py | 8 ++++++++ ckanext/versions/plugin.py | 1 + 2 files changed, 9 insertions(+) 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