Skip to content

Commit 25434a7

Browse files
Merge branch 'master' into fix/get-cloudpaymentid-from-compose-payment-api
2 parents 0cdb661 + a766c29 commit 25434a7

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

src/resolvers/workspace.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,8 @@ module.exports = {
436436

437437
const defaultPlan = await factories.plansFactory.getDefaultPlan();
438438

439-
if (workspaceModel.tariffPlanId === defaultPlan.id) {
439+
// Prevent re-applying the free plan if workspace is already on it.
440+
if (workspaceModel.tariffPlanId.toString() === defaultPlan._id.toString()) {
440441
throw new UserInputError('You already use default plan');
441442
}
442443

0 commit comments

Comments
 (0)