From 86a6075c3069c633e1b74091c8a6425db98e25e8 Mon Sep 17 00:00:00 2001 From: Franziska Kunsmann Date: Thu, 31 Oct 2024 18:05:51 +0100 Subject: [PATCH] ensure we also get "per speaker" answers in pdf output --- pretalx_broadcast_tools/exporter.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pretalx_broadcast_tools/exporter.py b/pretalx_broadcast_tools/exporter.py index fcd87e1..763e5a5 100644 --- a/pretalx_broadcast_tools/exporter.py +++ b/pretalx_broadcast_tools/exporter.py @@ -197,7 +197,8 @@ class PDFInfoPage(Flowable): style=self.style["Heading"], ) ) - for answer in self.talk.submission.answers.order_by("question"): + + for answer in self.talk.submission.answers.order_by("question__position"): if answer.question.id not in self._questions: continue self._question_text( @@ -206,6 +207,16 @@ class PDFInfoPage(Flowable): style=self.style["Question"], ) + for spk in self.talk.submission.speakers.all(): + for answer in spk.answers.order_by("question__position"): + if answer.question.id not in self._questions: + continue + self._question_text( + f"{answer.question.question.localize(self.event.locale)} ({spk.get_display_name()})", + answer.answer, + style=self.style["Question"], + ) + if self.talk.submission.notes: self._space() self._add(