diff --git a/app/apps/client/admin/helpers.js b/app/apps/client/admin/helpers.js index 839974e465e..6e8c8ab58be 100644 --- a/app/apps/client/admin/helpers.js +++ b/app/apps/client/admin/helpers.js @@ -335,7 +335,7 @@ export const appStatusSpanProps = ({ return { type: 'failed', icon: 'warning', - label: 'Failed', + label: status === AppStatus.INVALID_SETTINGS_DISABLED ? 'Config Needed' : 'Failed', }; } diff --git a/app/apps/server/communication/rest.js b/app/apps/server/communication/rest.js index 5b0a4f19d40..43d836c86f1 100644 --- a/app/apps/server/communication/rest.js +++ b/app/apps/server/communication/rest.js @@ -227,7 +227,7 @@ export class AppsRestApi { return API.v1.failure({ error: 'Failed to get a file to install for the App. ' }); } - const aff = Promise.await(manager.add(buff.toString('base64'), false, marketplaceInfo)); + const aff = Promise.await(manager.add(buff.toString('base64'), true, marketplaceInfo)); const info = aff.getAppInfo(); if (aff.hasStorageError()) { diff --git a/app/apps/server/cron.js b/app/apps/server/cron.js index 0dbed66a9bd..3e7a1d9cdc7 100644 --- a/app/apps/server/cron.js +++ b/app/apps/server/cron.js @@ -10,10 +10,14 @@ import { Settings, Users, Roles } from '../../models/server'; const notifyAdminsAboutInvalidApps = Meteor.bindEnvironment(function _notifyAdminsAboutInvalidApps(apps) { + if (!apps) { + return; + } + const hasInvalidApps = !!apps.find((app) => app.getLatestLicenseValidationResult().hasErrors); if (!hasInvalidApps) { - return apps; + return; } const id = 'someAppInInvalidState'; @@ -50,6 +54,10 @@ const notifyAdminsAboutInvalidApps = Meteor.bindEnvironment(function _notifyAdmi }); const notifyAdminsAboutRenewedApps = Meteor.bindEnvironment(function _notifyAdminsAboutRenewedApps(apps) { + if (!apps) { + return; + } + const renewedApps = apps.filter((app) => app.getStatus() === AppStatus.DISABLED && app.getPreviousStatus() === AppStatus.INVALID_LICENSE_DISABLED); if (renewedApps.length === 0) {