mirror of
https://github.com/xtr-dev/payload-mailing.git
synced 2025-12-10 08:13:23 +00:00
When the email's jobs relationship is populated with full job objects instead of just IDs, calling String(job) on an object results in "[object Object]", which causes a Mongoose ObjectId casting error. This fix properly extracts the ID from job objects or uses the value directly if it's already an ID. Fixes job scheduler error: "Cast to ObjectId failed for value '[object Object]'" 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
5.2 KiB
5.2 KiB