This commit is contained in:
Syed Ali Shahbaz
2025-02-12 19:16:52 +00:00
committed by GitHub
parent d027f8004a
commit 8ada940dc7
@@ -71,7 +71,22 @@ const buildBaseWhereCondition = async ({
id: true,
},
});
if (teamsFromOrg.length === 0) return { whereCondition, isEmptyResponse: true };
if (teamsFromOrg.length === 0) {
return {
whereCondition: {
...whereCondition,
OR: [
...(whereCondition.OR ?? []),
{
teamId: ctx.userOrganizationId,
isTeamBooking: true,
},
],
},
isEmptyResponse: true,
};
}
const teamConditional = {
id: {