fix: remove ghost users being added as seats in stripe

This commit is contained in:
ShubhamPalriwala
2024-05-29 18:05:51 +05:30
parent 81b0c8bc12
commit 686a28cc09

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) {