Skip to content

Commit 4d4d55a

Browse files
authored
Merge pull request #3239 from arash77/external-event-slug-fix
Update slug generation to use entry ID
2 parents 5239763 + 63725ae commit 4d4d55a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

utils/gtn-import.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@
5757
link = entry.get("link", "")
5858
summary = html.unescape(entry.get("summary", ""))
5959

60-
slug = os.path.splitext(os.path.basename(link.rstrip("/")))[0]
60+
id = entry.get("id", "")
61+
slug = os.path.splitext(os.path.basename(id.rstrip("/")))[0]
6162
folder = f"{date_ymd}-{slug}" if import_type == "news" else f"{slug}"
6263

6364
pr_exists = False

0 commit comments

Comments
 (0)