Skip to content

Commit c7dfea1

Browse files
committed
fix: Show alias name if not static code is available in migration error message
1 parent a0cd922 commit c7dfea1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

djangocms_alias/migrations/0005_dynamic_slot_names.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def migrate_slots(apps, schema_editor, forward=True):
3535
print(
3636
f"AliasContent {alias_content.pk} has multiple placeholders, expected only one. "
3737
"Skipping migration for this instance:\n"
38-
f"{alias_content.alias.static_code} ({alias_content.language})",
38+
f"{alias_content.alias.static_code or alias_content.name} ({alias_content.language})",
3939
)
4040
for placeholder in slots:
4141
print(f" - Placeholder {placeholder.pk} with slot '{placeholder.slot}'")

0 commit comments

Comments
 (0)