Repository navigation
fix(api): keep the events schema switch when modifiers are cleared - #116672
pauldambra wants to merge 1 commit into
Conversation
A PATCH with modifiers null replaced the whole column, so it also cleared useNewEventsSchema. Staff set that key per project, and clients cannot set it. Both the team and project serializers now merge modifiers through one helper, which keeps that key on a clear. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Generated-By: PostHog Desktop Task-Id: db0f77d0-97b2-40c9-ae23-34ebc183c8fe
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
🤖 CI report
|
Problem
useNewEventsSchemafrom dict updates, butPATCH {"modifiers": null}replaces the whole column.Changes
useNewEventsSchema. All other modifiers still clear.merge_modifiers, instead of two copies of the merge.How did you test this code?
Test rationale:
test_clearing_modifiers_keeps_use_new_events_schemasends a null PATCH through the environments and projects URLs, which use different serializers. Both cases failed before the fix. The existingtest_modifiers_use_new_events_schema_is_not_client_writablecovers dict updates only.Release status
Docs update
None. No document under
docs/covers this server-managed key.🤖 Agent context
Autonomy: Human-driven (agent-assisted)
Agent: Claude Code (claude-opus-5-5) in PostHog Desktop
nullwith a 400. That would break clients that use null to reset their modifiers.Created with PostHog Desktop
🤖 Generated with Claude Code