Skip to content

Conversation

@existentialcoder
Copy link
Contributor

@existentialcoder existentialcoder commented Oct 23, 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

Please describe.

How did you test this code?

Manual API testing

@existentialcoder existentialcoder requested a review from a team as a code owner October 23, 2025 21:56
@existentialcoder existentialcoder requested review from Zaimwa9 and removed request for a team October 23, 2025 21:56
@cursor
Copy link

cursor bot commented Oct 23, 2025

You have run out of free Bugbot PR reviews for this billing cycle. This will reset on November 10.

To receive reviews on all of your PRs, visit the Cursor dashboard to activate Pro and start your 14-day free trial.

@vercel
Copy link

vercel bot commented Oct 23, 2025

@existentialcoder is attempting to deploy a commit to the Flagsmith Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added the api Issue related to the REST API label Oct 23, 2025
@existentialcoder
Copy link
Contributor Author

@matthewelwell Apologies for the delay. Let me know if this would work!

@matthewelwell
Copy link
Contributor

Hi @existentialcoder, thanks for the contribution! Can you make sure that the tests pass (see here) and I'll review it once that's done. Thanks!

@codecov
Copy link

codecov bot commented Oct 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.01%. Comparing base (57f0e97) to head (eea586b).
⚠️ Report is 55 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6196      +/-   ##
==========================================
+ Coverage   97.99%   98.01%   +0.01%     
==========================================
  Files        1278     1278              
  Lines       44927    45151     +224     
==========================================
+ Hits        44028    44253     +225     
+ Misses        899      898       -1     

☔ 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.

@existentialcoder existentialcoder changed the title fix: Use initial_data instead of parsed data for features with dot fix: Use data instead of parsed data for features with dot Oct 24, 2025
@existentialcoder existentialcoder changed the title fix: Use data instead of parsed data for features with dot fix: Use data instead of parsed data for recording analytics Oct 24, 2025
@existentialcoder
Copy link
Contributor Author

Hi @existentialcoder, thanks for the contribution! Can you make sure that the tests pass (see here) and I'll review it once that's done. Thanks!

Addressed. I guess it's only the vercel complaints now

@existentialcoder
Copy link
Contributor Author

existentialcoder commented Oct 28, 2025

Hi @existentialcoder, thanks for the contribution! Can you make sure that the tests pass (see here) and I'll review it once that's done. Thanks!

Addressed. I guess it's only the vercel complaints now

Were you able to check? @matthewelwell

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.

Thanks, especially for adding the relevant test 👍

Zaimwa9
Zaimwa9 previously approved these changes Oct 28, 2025
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.

Thanks 👍

@existentialcoder
Copy link
Contributor Author

Thanks 👍

Might have fixed the build one more time. Can you check again, sorry :) @Zaimwa9

@existentialcoder
Copy link
Contributor Author

Thanks 👍

Might have fixed the build one more time. Can you check again, sorry :) @Zaimwa9

Just a reminder. Thanks :)

@vercel
Copy link

vercel bot commented Nov 3, 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 Nov 3, 2025 10:12am
flagsmith-frontend-preview Ignored Ignored Preview Nov 3, 2025 10:12am
flagsmith-frontend-staging Ignored Ignored Preview Nov 3, 2025 10:12am

Copy link
Contributor

@matthewelwell matthewelwell left a comment

Choose a reason for hiding this comment

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

@existentialcoder thanks again for the contribution, and sorry for the delay in getting back to you after the last review. I've added a few comments in on top of previous requests from @Zaimwa9 .

Comment on lines +30 to +32
@pytest.fixture()
def feature_with_dots(project: Project) -> Feature:
return Feature.objects.create(name="feature.with.dots", project=project) # type: ignore[no-any-return]
Copy link
Contributor

Choose a reason for hiding this comment

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

This doesn't need to be a fixture since it's only used in a single test. I'd rather that we just instantiate the feature directly in the test.

Comment on lines +91 to +92
# validated_data splits out request body with '.' in feature name (e.g a.b.c).
# Instead, it's safe to use self.data as keys are not altered.
Copy link
Contributor

Choose a reason for hiding this comment

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

This comment doesn't make sense to me. Surely we want the "." in the feature name. Can we be more explicit here about what the difference is between validated_data and data in this scenario?

Also, is there a neater way to solve this in the serializer rather than the view? I wonder if skipping validated_data here might lead to other problems down the line.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants