From ffd3ce25ba6a79a30263e904a8cd470eb7aa1355 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Ja=C5=A1ek?= Date: Mon, 2 Sep 2024 09:29:22 +0200 Subject: [PATCH] fix planning parser error (#2066) https://sentry.sourcefabric.org/share/issue/4e6405ba79c04368a63c46c8fd154b09/ --- server/planning/feed_parsers/superdesk_planning_xml.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/planning/feed_parsers/superdesk_planning_xml.py b/server/planning/feed_parsers/superdesk_planning_xml.py index 54041f797..f3dbed37d 100644 --- a/server/planning/feed_parsers/superdesk_planning_xml.py +++ b/server/planning/feed_parsers/superdesk_planning_xml.py @@ -225,7 +225,7 @@ def parse_coverage_planning(self, news_coverage_elt, item): if planning_elt is not None: headline_elt = planning_elt.find(self.qname("headline")) content = planning_elt.find(self.qname("itemClass")).get("qcode") - planning = {"slugline": headline_elt.text.strip(), "g2_content_type": content.split(":")[1]} + planning = {"slugline": (headline_elt.text or "").strip(), "g2_content_type": content.split(":")[1]} description_elt = planning_elt.find(self.qname("description")) if description_elt is not None and description_elt.text: