Skip to content

Commit a766c29

Browse files
Merge pull request #631 from codex-team/fix/disable-free-plan-reset
2 parents 3d9de27 + a86a937 commit a766c29

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "hawk.api",
3-
"version": "1.4.7",
3+
"version": "1.4.8",
44
"main": "index.ts",
55
"license": "BUSL-1.1",
66
"scripts": {

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)