-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
fix: Migration 0033 failed when empty placeholder objects were not present in the db #8338
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 (collapsed on small PRs)Reviewer's GuideMigration 0033 now checks for the existence of the PlaceholderField object before updating its content_type_id and object_id, preventing NoneType AttributeErrors when placeholder entries are missing. Class diagram for updated PlaceholderField handling in migration 0033classDiagram
class PlaceholderField {
+content_type_id
+object_id
+save()
}
class Migration0033 {
+forwards(apps, schema_editor)
}
Migration0033 --> PlaceholderField : updates if exists
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8338 +/- ##
=======================================
Coverage 89.71% 89.71%
=======================================
Files 129 129
Lines 12750 12750
=======================================
Hits 11439 11439
Misses 1311 1311 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Co-authored-by: Fabian Braun <[email protected]>
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.
LGTM
Description
Migration 0033 can fail if a
PlaceholderField
object is empty (None
).Related resources
Checklist
main
Summary by Sourcery
Bug Fixes: