-
Notifications
You must be signed in to change notification settings - Fork 466
fix: metadata inputs not updating values #5372
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
for more information, see https://pre-commit.ci
for more information, see https://pre-commit.ci
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
1 Skipped Deployment
|
Docker builds report
|
for more information, see https://pre-commit.ci
|
Uffizzi Preview |
Co-authored-by: Tiago Paiva <tiago@tiagopaiva.me>
…-metadata-value-from-entity
api/environments/serializers.py
Outdated
| environment = super().update(instance, validated_data) # type: ignore[no-untyped-call] | ||
| self.update_metadata(environment, metadata_items) | ||
| environment.refresh_from_db() | ||
| assert isinstance(environment, Environment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed? Not a blocker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not needed per say but mypy is a tough opponent and it would require unrelated typing that I think is overkill in the context of a bug fix
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fairy nuff. Let me know if you need help swinging a few punches.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, the issue is tracked Flagsmith/flagsmith-common#71.
for more information, see https://pre-commit.ci
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5372 +/- ##
==========================================
+ Coverage 97.62% 97.63% +0.01%
==========================================
Files 1238 1239 +1
Lines 43000 43097 +97
==========================================
+ Hits 41977 42078 +101
+ Misses 1023 1019 -4 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
api/environments/serializers.py
Outdated
| environment = super().update(instance, validated_data) # type: ignore[no-untyped-call] | ||
| self.update_metadata(environment, metadata_items) | ||
| environment.refresh_from_db() | ||
| assert isinstance(environment, Environment) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW, the issue is tracked Flagsmith/flagsmith-common#71.
…ta-inputs-not-updating-value
Thanks for submitting a PR! Please check the boxes below:
docs/if required so people know about the feature!Changes
Metadata fields inputs could stay stuck on non up to date values
envDatadependency in AddMetadataToEntity useEffectHow did you test this code?
https://www.loom.com/share/f980f034f6144c548a2f30efd809f828