1
0
Fork 0
mirror of https://github.com/Kunsi/pretalx-plugin-broadcast-tools synced 2024-12-22 04:02:44 +00:00

ensure we also get "per speaker" answers in pdf output

This commit is contained in:
Franzi 2024-10-31 18:05:51 +01:00
parent 620b2fb85e
commit 86a6075c30
Signed by: kunsi
GPG key ID: 12E3D2136B818350

View file

@ -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(