fix: addressed bugs

This commit is contained in:
Sheen Capadngan
2024-09-25 14:30:22 +08:00
parent 6733349af0
commit 974e21d856
3 changed files with 6 additions and 5 deletions
@@ -71,7 +71,7 @@ export const secretApprovalPolicyServiceFactory = ({
.map((approver) => (approver.type === ApproverType.User ? approver.name : undefined))
.filter(Boolean) as string[];
if (!groupApprovers && approvals > approvers.length)
if (!groupApprovers.length && approvals > approvers.length)
throw new BadRequestError({ message: "Approvals cannot be greater than approvers" });
const { permission } = await permissionService.getProjectPermission(