v24.0 Release Notes
Bug Fix: Automation Enrollment Failure
Fixed a bug where enrolling contacts in automations could fail with the error:
pq: cannot set path in scalar
Root Cause
When creating automations, if the stats field was not explicitly initialized, it could be stored as a JSONB scalar (null) instead of an object ({}). The automation_enroll_contact trigger uses jsonb_set() to update stats, which fails on scalar values.
Fix
- Migration v24 automatically fixes all existing automations with invalid stats values
- The automation creation code now ensures
statsis always initialized as an empty object
Upgrade
No manual action required. The migration runs automatically on startup.