Skip to content

Commit 90716ac

Browse files
authored
Update djangocms_frontend/migrations/0002_migrate_links.py
1 parent 711a5be commit 90716ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

djangocms_frontend/migrations/0002_migrate_links.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ def convert_item(config, direction):
55
"""Convert FrontendUIItem config to new djangocms_link format."""
66
if direction == "forward":
77
if config.get("external_link"):
8-
if config.get("anchor"):
9-
anchor = "#" + config.get("anchor")
8+
if (config.get("anchor") or "").strip():
9+
anchor = "#" + config.get("anchor").strip()
1010
del config["anchor"]
1111
else:
1212
anchor = ""

0 commit comments

Comments
 (0)