8000 Fallback should there be no markup for a specific product · codesalatdev/python-picnic-api@e63ede2 · GitHub
[go: up one dir, main page]

Skip to content

Commit e63ede2

Browse files
committed
Fallback should there be no markup for a specific product
1 parent d5b9f93 commit e63ede2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/python_picnic_api2/client.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def get_article(self, article_id: str, add_category_name=False):
114114
return None
115115

116116
color_regex = re.compile(r"#\(#\d{6}\)")
117-
producer = re.sub(color_regex, "", str(article_details[1]["markdown"]))
117+
producer = re.sub(color_regex, "", str(article_details[1].get("markdown", "")))
118118
article_name = re.sub(color_regex, "", str(article_details[0]["markdown"]))
119119

120120
article = {"name": f"{producer} {article_name}", "id": article_id}

0 commit comments

Comments
 (0)
0