Skip to content

Conversation

gagantrivedi
Copy link
Member

@gagantrivedi gagantrivedi commented Aug 21, 2025

Thanks for submitting a PR! Please check the boxes below:

  • I have added information to docs/ if required so people know about the feature!
  • I have filled in the "Changes" section below?
  • I have filled in the "How did you test this code" section below?
  • I have used a Conventional Commit title for this Pull Request

Changes

Overwrite the __init__ method to handle deletion of rules/conditions correctly. The earlier implementation was overriding get_initial, but since WritableNestedModelSerializer uses that internally, it resulted in some strange behavior where rules/conditions that should have been created or updated were instead removed.

How did you test this code

Adds unit tests

@gagantrivedi gagantrivedi requested a review from a team as a code owner August 21, 2025 07:21
@gagantrivedi gagantrivedi requested review from Zaimwa9 and removed request for a team August 21, 2025 07:21
Copy link

vercel bot commented Aug 21, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

3 Skipped Deployments
Project Deployment Preview Comments Updated (UTC)
docs Ignored Ignored Preview Aug 21, 2025 9:34am
flagsmith-frontend-preview Ignored Ignored Preview Aug 21, 2025 9:34am
flagsmith-frontend-staging Ignored Ignored Preview Aug 21, 2025 9:34am

@github-actions github-actions bot added api Issue related to the REST API fix labels Aug 21, 2025
Copy link
Contributor

github-actions bot commented Aug 21, 2025

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-5953 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-5953 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-5953 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-5953 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-5953 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-5953 Finished ✅ Results

Copy link

codecov bot commented Aug 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.86%. Comparing base (0dcd073) to head (898e1d1).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5953   +/-   ##
=======================================
  Coverage   97.86%   97.86%           
=======================================
  Files        1275     1275           
  Lines       45227    45267   +40     
=======================================
+ Hits        44261    44301   +40     
  Misses        966      966           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👏 Sorry, couple of comments. Being a bit annoying just to close the topic once and for all

@github-actions github-actions bot added fix and removed fix labels Aug 21, 2025
@gagantrivedi gagantrivedi requested a review from Zaimwa9 August 21, 2025 09:35
Copy link
Contributor

@Zaimwa9 Zaimwa9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@gagantrivedi gagantrivedi merged commit ad1d568 into main Aug 21, 2025
29 checks passed
@gagantrivedi gagantrivedi deleted the fix/segment-update-rules branch August 21, 2025 11:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Issue related to the REST API fix
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants