From 9eecea60f8222dfbe359aa88f282f6d9095dff36 Mon Sep 17 00:00:00 2001 From: Johannes Raggam Date: Thu, 8 Feb 2024 12:16:27 +0100 Subject: [PATCH] Fix problem with the identification report not being generated for certain survey sessions. Ref: scrum-1846 Fixes: #688 --- docs/changes.rst | 5 +++++ src/euphorie/client/docx/html.py | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/changes.rst b/docs/changes.rst index 6b602566b..61f3d9987 100644 --- a/docs/changes.rst +++ b/docs/changes.rst @@ -4,6 +4,11 @@ Changelog 16.0.0 (unreleased) ------------------- +- Fix problem with the identification report not being generated for certain survey sessions. + Ref: scrum-1846 + Fixes: #688 + [thet] + - Do not log anymore not found exceptions [ale-rt] diff --git a/src/euphorie/client/docx/html.py b/src/euphorie/client/docx/html.py index 4dca32359..e89fab82e 100644 --- a/src/euphorie/client/docx/html.py +++ b/src/euphorie/client/docx/html.py @@ -110,7 +110,7 @@ def handleElement(self, node, doc, style=None): # from newlines in the markup # if node.tag in ['li', 'p', 'strong', 'em', 'b', 'i']: tail = tail and tail.strip() - if tail and not doc.text.endswith(tail): + if tail and not doc.paragraphs[-1].text.endswith(tail): doc.add_paragraph(tail) return doc