omit icon when creating install/clone eventlog entries

Otherwise, we hit "Error: ER_DATA_TOO_LONG: Data too long for column 'data'"
This commit is contained in:
Girish Ramakrishnan
2021-06-15 11:12:46 -07:00
parent 28c908b126
commit 9436dc688b
+4 -4
View File
@@ -731,7 +731,7 @@ function install(data, auditSource, callback) {
assert.strictEqual(typeof data.manifest, 'object'); // manifest is already downloaded
var location = data.location.toLowerCase(),
let location = data.location.toLowerCase(),
domain = data.domain.toLowerCase(),
portBindings = data.portBindings || null,
accessRestriction = data.accessRestriction || null,
@@ -802,7 +802,7 @@ function install(data, auditSource, callback) {
debug('Will install app with id : ' + appId);
var data = {
const data = {
accessRestriction,
memoryLimit,
sso,
@@ -837,7 +837,7 @@ function install(data, auditSource, callback) {
addTask(appId, data.installationState, task, function (error, result) {
if (error) return callback(error);
const newApp = _.extend({}, data, { appStoreId, manifest, location, domain, portBindings });
const newApp = _.extend({}, _.omit(data, 'icon'), { appStoreId, manifest, location, domain, portBindings });
newApp.fqdn = domains.fqdn(newApp.location, domainObjectMap[newApp.domain]);
newApp.alternateDomains.forEach(function (ad) { ad.fqdn = domains.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
newApp.aliasDomains.forEach(function (ad) { ad.fqdn = domains.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
@@ -1715,7 +1715,7 @@ function clone(app, data, user, auditSource, callback) {
addTask(newAppId, exports.ISTATE_PENDING_CLONE, task, function (error, result) {
if (error) return callback(error);
const newApp = _.extend({}, data, { appStoreId, manifest, location, domain, portBindings });
const newApp = _.extend({}, _.omit(data, 'icon'), { appStoreId, manifest, location, domain, portBindings });
newApp.fqdn = domains.fqdn(newApp.location, domainObjectMap[newApp.domain]);
newApp.alternateDomains.forEach(function (ad) { ad.fqdn = domains.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });
newApp.aliasDomains.forEach(function (ad) { ad.fqdn = domains.fqdn(ad.subdomain, domainObjectMap[ad.domain]); });