Skip to content

Commit

Permalink
Update generate_markdown_list.py
Browse files Browse the repository at this point in the history
  • Loading branch information
diegovelezg authored Aug 22, 2024
1 parent 4b5cbbb commit c46177e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion generate_markdown_list.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,10 @@ def generate_markdown_list(root_dir):
config_data = read_config_data(config_file)

discord_url = config_data.get("discord_URL", {}).get(lang, "")
discord_channel_id, discord_message_id = discord_url.split('/')[-2:], ["", ""]
if discord_url:
discord_channel_id, discord_message_id = discord_url.split('/')[-2:]
else:
discord_channel_id, discord_message_id = None, None

slug = f"{track or ''}{'-' + skill if skill else ''}{'-' + module if module else ''}-{os.path.splitext(file)[0]}"

Expand Down

0 comments on commit c46177e

Please sign in to comment.