fix(versioning): update segment override in place when patch omits feature_segment.id - #8515
Tyagiquamar wants to merge 1 commit into
Conversation
|
@Tyagiquamar is attempting to deploy a commit to the Flagsmith Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 8 included reviews per hour; 7 remain after this review. 📝 WalkthroughWalkthrough
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to The versioned segment override PATCH behavior is covered and no actionable current-head risk remains. ✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Changes
Closes #8395
PATCH .../featurestates/{id}/ with a feature_segment payload omitting id now updates the existing FeatureSegment in place. EnvironmentFeatureVersionFeatureStatesViewSet.get_serializer defaults feature_segment.id from the instance on update/partial_update, mirroring EnvironmentFeatureVersionCreateSerializer._update_feature_state. Previously drf-writable-nested saw no pk, inserted a duplicate FeatureSegment, and the request 500d on the unique constraint.
How did you test this code?