Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cms/migrations/0033_placeholder_source_data_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def forwards(apps, schema_editor):
content_type_id=cur_ct_obj.pk,
object_id=obj.pk,
)
else:
elif obj_placeholder_field:
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Consider whether the new elif branch could mask cases where obj_placeholder_field is falsy but not None.

Changing to 'elif obj_placeholder_field:' means the block only runs for truthy values. If valid cases exist where obj_placeholder_field is falsy, this logic may skip updates. Please verify that all necessary cases are still handled.

obj_placeholder_field.content_type_id = cur_ct_obj.pk
obj_placeholder_field.object_id = obj.pk
obj_placeholder_field.save()
Expand Down