diff --git a/README.rst b/README.rst index 5ce5223..1d4a855 100644 --- a/README.rst +++ b/README.rst @@ -160,7 +160,7 @@ field. The currently supported configuration options are: * default_groups: A list of groups to which the harvested datasets will be added to. The groups must exist. Note that you must use ids or names to define the groups according to the API version you defined (names for version - '1', ids for version '2'). + 1, ids for version 2). * default_extras: A dictionary of key value pairs that will be added to extras of the harvested datasets. You can use the following replacement strings, diff --git a/ckanext/harvest/harvesters/ckanharvester.py b/ckanext/harvest/harvesters/ckanharvester.py index 109c437..4409990 100644 --- a/ckanext/harvest/harvesters/ckanharvester.py +++ b/ckanext/harvest/harvesters/ckanharvester.py @@ -280,7 +280,7 @@ class CKANHarvester(HarvesterBase): group.pop(key, None) get_action('group_create')(context, group) log.info('Group %s has been newly created' % group_name) - if self.api_version == '1': + if self.api_version == 1: validated_groups.append(group['name']) else: validated_groups.append(group['id'])