From 1f1bc9c949d74a0d729061b2a6b60f714f11fb6b Mon Sep 17 00:00:00 2001 From: Eric Date: Tue, 17 Sep 2024 18:00:58 -0500 Subject: [PATCH] Website: add default organization to Premium trial license keys. (#22192) Closes: #22190 Changes: - updated `save-questionnaire-progress` to set a default value for the `organization` value of generated license keys (if a user does not have an organization set) --- website/api/controllers/save-questionnaire-progress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/website/api/controllers/save-questionnaire-progress.js b/website/api/controllers/save-questionnaire-progress.js index 4e3beddf0e..62faf37929 100644 --- a/website/api/controllers/save-questionnaire-progress.js +++ b/website/api/controllers/save-questionnaire-progress.js @@ -147,7 +147,7 @@ module.exports = { let thirtyDaysFromNowAt = Date.now() + (1000 * 60 * 60 * 24 * 30); let trialLicenseKeyForThisUser = await sails.helpers.createLicenseKey.with({ numberOfHosts: 10, - organization: this.req.me.organization, + organization: this.req.me.organization ? this.req.me.organization : 'Fleet Premium trial', expiresAt: thirtyDaysFromNowAt, }); // Save the trial license key to the DB record for this user.