[#83] Fix key error when using default_groups
This commit is contained in:
parent
3693028009
commit
5b677b6099
|
@ -338,6 +338,8 @@ class CKANHarvester(HarvesterBase):
|
||||||
# Set default groups if needed
|
# Set default groups if needed
|
||||||
default_groups = self.config.get('default_groups', [])
|
default_groups = self.config.get('default_groups', [])
|
||||||
if default_groups:
|
if default_groups:
|
||||||
|
if not 'groups' in package_dict:
|
||||||
|
package_dict['groups'] = []
|
||||||
package_dict['groups'].extend([g for g in default_groups if g not in package_dict['groups']])
|
package_dict['groups'].extend([g for g in default_groups if g not in package_dict['groups']])
|
||||||
|
|
||||||
# Find any extras whose values are not strings and try to convert
|
# Find any extras whose values are not strings and try to convert
|
||||||
|
|
Loading…
Reference in New Issue