Merge pull request #1898 from Infisical/shubham/eng-632-fix-ghost-users-are-added-to-seats-in-stripe

fix: remove ghost users being added as seats in stripe
This commit is contained in:
Maidul Islam
2024-05-29 17:21:52 -04:00
committed by GitHub

View File

@@ -16,6 +16,8 @@ export const licenseDALFactory = (db: TDbClient) => {
void bd.where({ orgId });
}
})
.join(TableName.Users, `${TableName.OrgMembership}.userId`, `${TableName.Users}.id`)
.where(`${TableName.Users}.isGhost`, false)
.count();
return doc?.[0].count;
} catch (error) {