Update plugin.py

Updating plugin.py to check for the existence of the extras key in the data_dict.
This commit is contained in:
Richard Claydon 2014-02-27 16:05:39 +00:00
parent d3cf5e58d1
commit e3492b57e7
1 changed files with 1 additions and 1 deletions

View File

@ -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