Fix api_version check in the group importer code

I have forgotten to update one check for the api_version 1 in the code
responsible for the remote group import feature. This commit fixes that.

Signed-off-by: Konrad Reiche <konrad.reiche@fokus.fraunhofer.de>
This commit is contained in:
Konrad Reiche 2013-05-27 13:36:56 +02:00
parent c858b9fe9f
commit 87cae31c75
2 changed files with 2 additions and 2 deletions

View File

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

View File

@ -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'])