Corrected docstring params field, duplicate if statement and deleting keys

for blank values.
This commit is contained in:
Mark Winterbottom 2015-11-02 16:59:43 +00:00
parent 443d690ac8
commit 7ffd6748f3
2 changed files with 5 additions and 4 deletions

View File

@ -12,6 +12,8 @@ def harvest_source_delete(context, data_dict):
This method just proxies the request to package_delete,
which will delete the actual harvest type dataset and the
HarvestSource object (via the after_delete extension point).
:param id: the name or id of the harvest source to delete
'''
log.info('Deleting harvest source: %r', data_dict)

View File

@ -285,7 +285,7 @@ def harvest_objects_import(context, data_dict):
segments = context.get('segments')
join_datasets = context.get('join_datasets')
join_datasets = context.get('join_datasets', True)
if source_id:
source = HarvestSource.get(source_id)
@ -560,9 +560,8 @@ def harvest_source_reindex(context, data_dict):
if package_dict.get('config'):
config = json.loads(package_dict['config'])
for key, value in package_dict.iteritems():
if value:
if value and key not in config:
new_dict[key] = value
if key not in config:
new_dict[key] = value
package_index = PackageSearchIndex()
package_index.index_package(