mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-15 23:48:38 +00:00
daily_reminder/email_sending used raw frappe.db.sql with two portability and correctness problems: - The update query selected `progress` and `progress_details` from `tabProject Update`, but those columns do not exist on the Project Update doctype, so the query raised on BOTH MariaDB and Postgres (the function is whitelisted-only, so the bug was latent). Drop the non-existent columns and the corresponding "Project Status"/"Notes" cells from the summary table. - `DATE_ADD(CURRENT_DATE, INTERVAL -1 DAY)` (MySQL-only) and a `CURRENT_DATE` Holiday lookup are not valid on Postgres. Convert to ORM: frappe.get_all for Project/Project Update/Project User, frappe.db.count for drafts, frappe.db.exists for the holiday check, and add_days(today(), -1) for the date filter. Also str() the frequency in the message so a NULL/empty frequency (Postgres returns None) does not raise. Adds a test (the file was an empty stub) that creates a project + an update dated yesterday and asserts the reminder finds it and runs end to end on both engines. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>