Maintain compatibility with rest-style updates

This commit is contained in:
David Read 2016-02-15 15:23:39 +00:00
parent f22100e6c2
commit 794fc93230
1 changed files with 3 additions and 1 deletions

View File

@ -309,7 +309,9 @@ class HarvesterBase(SingletonPlugin):
package_dict.setdefault('name',
existing_package_dict['name'])
new_package = p.toolkit.get_action('package_update')(context, package_dict)
new_package = p.toolkit.get_action(
'package_update' if package_dict_form == 'package_show'
else 'package_update_rest')(context, package_dict)
else:
log.info('No changes to package with GUID %s, skipping...' % harvest_object.guid)