[fix] Do not pass empty args to moulinette on app install.

This commit is contained in:
opi 2014-06-16 16:03:59 +02:00
parent 1665b7ab2b
commit f4a1f3b9b8

View file

@ -859,6 +859,11 @@ app = Sammy('#main', function (sam) {
delete c.params['label']; delete c.params['label'];
delete c.params['app']; delete c.params['app'];
params['args'] = c.serialize(c.params.toHash()); params['args'] = c.serialize(c.params.toHash());
// Do not pass empty args.
if (params['args'] == "") {
delete params['args'];
}
c.api('/apps', function() { // http://api.yunohost.org/#!/app/app_install_post_2 c.api('/apps', function() { // http://api.yunohost.org/#!/app/app_install_post_2
c.redirect('#/apps'); c.redirect('#/apps');
}, 'POST', params); }, 'POST', params);