From de57dd41023033e01456cce2c82322baa0562c5f Mon Sep 17 00:00:00 2001 From: Bas van den Aakster Date: Tue, 7 Oct 2025 22:01:23 +0200 Subject: [PATCH] Fix filterOptions ObjectId casting error and bump version to 0.4.20 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixed incorrect usage of resolveID in filterOptions where { id } was passed instead of id directly. This caused ObjectId casting errors when the id parameter was a populated object. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- package.json | 2 +- src/collections/Emails.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1ff2df2..5d8d793 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@xtr-dev/payload-mailing", - "version": "0.4.19", + "version": "0.4.20", "description": "Template-based email system with scheduling and job processing for PayloadCMS", "type": "module", "main": "dist/index.js", diff --git a/src/collections/Emails.ts b/src/collections/Emails.ts index f31b145..0fb8237 100644 --- a/src/collections/Emails.ts +++ b/src/collections/Emails.ts @@ -206,7 +206,7 @@ const Emails: CollectionConfig = { readOnly: true, }, filterOptions: ({ id }) => { - const emailId = resolveID({ id }) + const emailId = resolveID(id) return { 'input.emailId': { equals: emailId ? String(emailId) : '',