Merge branch 'metaodi-117-url-already-in-use'
This commit is contained in:
commit
a71cc495fb
|
@ -201,8 +201,11 @@ class HarvesterBase(SingletonPlugin):
|
||||||
# exception
|
# exception
|
||||||
context.pop('__auth_audit', None)
|
context.pop('__auth_audit', None)
|
||||||
|
|
||||||
# Set name if not already there
|
# Set name for new package to prevent name conflict, see issue #117
|
||||||
package_dict.setdefault('name', self._gen_new_name(package_dict['title']))
|
if package_dict.get('name', None):
|
||||||
|
package_dict['name'] = self._gen_new_name(package_dict['name'])
|
||||||
|
else:
|
||||||
|
package_dict['name'] = self._gen_new_name(package_dict['title'])
|
||||||
|
|
||||||
log.info('Package with GUID %s does not exist, let\'s create it' % harvest_object.guid)
|
log.info('Package with GUID %s does not exist, let\'s create it' % harvest_object.guid)
|
||||||
harvest_object.current = True
|
harvest_object.current = True
|
||||||
|
|
Loading…
Reference in New Issue