We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 0cdb661 + a766c29 commit 25434a7Copy full SHA for 25434a7
1 file changed
src/resolvers/workspace.js
@@ -436,7 +436,8 @@ module.exports = {
436
437
const defaultPlan = await factories.plansFactory.getDefaultPlan();
438
439
- if (workspaceModel.tariffPlanId === defaultPlan.id) {
+ // Prevent re-applying the free plan if workspace is already on it.
440
+ if (workspaceModel.tariffPlanId.toString() === defaultPlan._id.toString()) {
441
throw new UserInputError('You already use default plan');
442
}
443
0 commit comments