Corrected docstring params field, duplicate if statement and deleting keys
for blank values.
This commit is contained in:
parent
443d690ac8
commit
7ffd6748f3
|
@ -12,6 +12,8 @@ def harvest_source_delete(context, data_dict):
|
||||||
This method just proxies the request to package_delete,
|
This method just proxies the request to package_delete,
|
||||||
which will delete the actual harvest type dataset and the
|
which will delete the actual harvest type dataset and the
|
||||||
HarvestSource object (via the after_delete extension point).
|
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)
|
log.info('Deleting harvest source: %r', data_dict)
|
||||||
|
|
|
@ -285,7 +285,7 @@ def harvest_objects_import(context, data_dict):
|
||||||
|
|
||||||
segments = context.get('segments')
|
segments = context.get('segments')
|
||||||
|
|
||||||
join_datasets = context.get('join_datasets')
|
join_datasets = context.get('join_datasets', True)
|
||||||
|
|
||||||
if source_id:
|
if source_id:
|
||||||
source = HarvestSource.get(source_id)
|
source = HarvestSource.get(source_id)
|
||||||
|
@ -560,8 +560,7 @@ def harvest_source_reindex(context, data_dict):
|
||||||
if package_dict.get('config'):
|
if package_dict.get('config'):
|
||||||
config = json.loads(package_dict['config'])
|
config = json.loads(package_dict['config'])
|
||||||
for key, value in package_dict.iteritems():
|
for key, value in package_dict.iteritems():
|
||||||
if value:
|
if key not in config:
|
||||||
if value and key not in config:
|
|
||||||
new_dict[key] = value
|
new_dict[key] = value
|
||||||
|
|
||||||
package_index = PackageSearchIndex()
|
package_index = PackageSearchIndex()
|
||||||
|
|
Loading…
Reference in New Issue