After the sanitize_payload order fix, account_id was being re-injected into data_to_insert for models that explicitly list account_id in fields_to_exclude_from_db (e.g. event_badge, event_device). Those tables have no account_id column, causing INSERT failures. Guard the post-sanitize account_id injection in both api_crud_v3.py and api_crud_v3_nested.py by checking fields_to_exclude_from_db first. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
30 KiB
30 KiB