From 4065ed607509f6f99cbe692cb0d97f4008c3b1af Mon Sep 17 00:00:00 2001 From: Fuhu Xia Date: Mon, 8 Jul 2024 11:27:57 -0400 Subject: [PATCH] use ckanext.datagovtheme.harvest_next to decouple from ckanext-harvest --- ckanext/datagovcatalog/plugin.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ckanext/datagovcatalog/plugin.py b/ckanext/datagovcatalog/plugin.py index 540de9a..76dd563 100644 --- a/ckanext/datagovcatalog/plugin.py +++ b/ckanext/datagovcatalog/plugin.py @@ -32,9 +32,13 @@ def get_helpers(self): return {} def get_actions(self): - return { - "harvest_get_notifications_recipients": harvest_get_notifications_recipients - } + harvest_next = toolkit.asbool(config.get('ckanext.datagovtheme.harvest_next', 'false')) + if harvest_next: + return {} + else: + return { + "harvest_get_notifications_recipients": harvest_get_notifications_recipients + } # IPackageController