From f488438ad0cc4f7d6e4ce3760b1b668139a027cc Mon Sep 17 00:00:00 2001 From: "Fabien \"egg\" O'Carroll" Date: Tue, 18 Jan 2022 11:18:08 +0200 Subject: [PATCH] Added check for Stripe config before migrations no-issue This stops us from attempting to run the migrations if Stripe has not been configured. --- ghost/stripe/lib/Migrations.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ghost/stripe/lib/Migrations.js b/ghost/stripe/lib/Migrations.js index 3b5c9ce1e1..f8e6c246d6 100644 --- a/ghost/stripe/lib/Migrations.js +++ b/ghost/stripe/lib/Migrations.js @@ -19,6 +19,10 @@ module.exports = class StripeMigrations { } async execute() { + if (!this.api._configured) { + logging.info('Stripe not configured - skipping migrations'); + return; + } await this.populateProductsAndPrices(); await this.populateStripePricesFromStripePlansSetting(); await this.populateMembersMonthlyPriceIdSettings();