Fix printing None if no publication for entry

No adding an empty string to the resulting markdown instead of the
actual content of the dict ('None') to the text.
This commit is contained in:
Marty Oehme 2023-06-27 10:38:56 +02:00
parent fb3dcca8fd
commit 14c6c8ccfb
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -18,7 +18,7 @@ def experience_to_md(data: dict[str, Any], lang: str = "en", headline: str = "")
md += f"## {exp['title'][lang]}\\hfill{exp['date'][lang]}\n\n" md += f"## {exp['title'][lang]}\\hfill{exp['date'][lang]}\n\n"
if "publication" in exp: if "publication" in exp:
md += f"> {exp['publication'][lang]}\n\n" md += f"> {exp['publication'][lang] or ''}\n\n"
for point in exp["bullets"]: for point in exp["bullets"]:
md += f"* {point[lang]}\n" md += f"* {point[lang]}\n"