boyska 2 years ago
parent
commit
a074d92484
1 changed files with 4 additions and 1 deletions
  1. 4 1
      ics2mdwn.py

+ 4 - 1
ics2mdwn.py

@@ -121,7 +121,10 @@ class HugoConverter(Converter):
                 )
             if "CATEGORIES" in talk:
                 try:
-                    frontmatter["tags"] = [str(t) for t in talk.get("CATEGORIES").cats]
+                    vobject = talk.get("CATEGORIES")
+                    if hasattr(vobject, 'cats'):
+                        vobject = vobject.cat
+                    frontmatter["tags"] = [str(t) for t in vobject]
                 except Exception as exc:
                     logging.warning("Error parsing categories: %s", str(exc))
             if 'base' in frontmatter['tags']: