From e3492b57e7986c031d48adc9861a6931da2102ae Mon Sep 17 00:00:00 2001 From: Richard Claydon Date: Thu, 27 Feb 2014 16:05:39 +0000 Subject: [PATCH] Update plugin.py Updating plugin.py to check for the existence of the extras key in the data_dict. --- ckanext/harvest/plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ckanext/harvest/plugin.py b/ckanext/harvest/plugin.py index 2809c9a..5b04d9c 100644 --- a/ckanext/harvest/plugin.py +++ b/ckanext/harvest/plugin.py @@ -97,7 +97,7 @@ class Harvest(p.SingletonPlugin, DefaultDatasetForm): .filter(HarvestObject.current==True) \ .first() - if context.get('for_edit'): + if context.get('for_edit') and 'extras' in data_dict: # If we are editing the dataset, check if the harvest extras # are there, and if so, remove them. This can happen eg when # doing resource_update, which calls package_show