diff options
Diffstat (limited to 'lib/basic-contract/agreement-comments/actions.ts')
| -rw-r--r-- | lib/basic-contract/agreement-comments/actions.ts | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/basic-contract/agreement-comments/actions.ts b/lib/basic-contract/agreement-comments/actions.ts index 2f60c3d8..32e9ce4c 100644 --- a/lib/basic-contract/agreement-comments/actions.ts +++ b/lib/basic-contract/agreement-comments/actions.ts @@ -2,7 +2,7 @@ import { revalidateTag } from "next/cache"; import db from "@/db/db"; -import { eq, and, desc, inArray, sql } from "drizzle-orm"; +import { eq, and, desc, inArray, sql, isNotNull, ne } from "drizzle-orm"; import { agreementComments, basicContract, vendors, users } from "@/db/schema"; import { saveFile, deleteFile } from "@/lib/file-stroage"; import { sendEmail } from "@/lib/mail/sendEmail"; @@ -62,7 +62,9 @@ export async function getAgreementComments( .where( and( eq(agreementComments.basicContractId, basicContractId), - eq(agreementComments.isDeleted, false) + eq(agreementComments.isDeleted, false), + isNotNull(agreementComments.comment), + ne(agreementComments.comment, '') ) ) .orderBy(desc(agreementComments.createdAt)); |
