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:
parent
c858b9fe9f
commit
87cae31c75
|
@ -160,7 +160,7 @@ field. The currently supported configuration options are:
|
||||||
* default_groups: A list of groups to which the harvested datasets will be
|
* 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
|
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
|
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
|
* 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,
|
of the harvested datasets. You can use the following replacement strings,
|
||||||
|
|
|
@ -280,7 +280,7 @@ class CKANHarvester(HarvesterBase):
|
||||||
group.pop(key, None)
|
group.pop(key, None)
|
||||||
get_action('group_create')(context, group)
|
get_action('group_create')(context, group)
|
||||||
log.info('Group %s has been newly created' % group_name)
|
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'])
|
validated_groups.append(group['name'])
|
||||||
else:
|
else:
|
||||||
validated_groups.append(group['id'])
|
validated_groups.append(group['id'])
|
||||||
|
|
Loading…
Reference in New Issue