- Notifications
You must be signed in to change notification settings - Fork 67
fix: Decode initial value for LinkFormField #239
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
Reviewer's Guide by SourceryThis pull request fixes an issue where initial values provided to the Sequence diagram for LinkFormField initializationsequenceDiagram participant LinkFormField LinkFormField->>LinkFormField: __init__(*args, **kwargs) alt isinstance(self.initial, dict) LinkFormField->>LinkFormField: prepare_value(self.initial) LinkFormField-->>LinkFormField: self.initial = prepared value end Updated class diagram for LinkFormFieldclassDiagram class LinkFormField { -initial: dict +__init__(*args, **kwargs) +prepare_value(value: dict) list[str | None] +to_python(value: list[str | None]) dict -_get_pos(link_type) int } note for LinkFormField "Initial value is now prepared in __init__" File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@ ## master #239 +/- ## ========================================== + Coverage 95.35% 95.70% +0.34% ========================================== Files 27 28 +1 Lines 668 675 +7 Branches 86 87 +1 ========================================== + Hits 637 646 +9 + Misses 14 13 -1 + Partials 17 16 -1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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.
Hey @fsbraun - I've reviewed your changes - here's some feedback:
Overall Comments:
- The changes to the test matrix look good, but it might be worth adding a comment explaining why Django 5.2 is excluded in
test_migrations.py. - Consider adding a test case with an empty initial value to ensure that case is handled correctly.
Here's what I looked at during the review
- 🟢 General issues: all looks good
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟢 Complexity: all looks good
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Description
An initial value given to the
LinkFormFieldneeds to be recognized.Related resources
Checklist
masterSlack to find a “pr review buddy” who is going to review my pull request.
Summary by Sourcery
Fix initial value handling for LinkFormField to correctly decode and prepare initial values for internal and external links
Bug Fixes:
CI:
Tests: