Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed powerpoint reports to omit closure info #52

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion democracy/views/reports_v2/hearing_report_powerpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
from pptx.chart.data import CategoryChartData
from pptx.enum.chart import XL_CHART_TYPE
from pptx.util import Inches
from democracy.enums import InitialSectionType
from democracy.models.section import SectionComment

from democracy.views.reports_v2.utils import (get_default_translation,
Expand Down Expand Up @@ -188,7 +189,8 @@ def _add_section(self, section: dict):
def _get_pptx(self):
sections = self.json['sections']
for section in sections:
self._add_section(section)
if section['type'] != InitialSectionType.CLOSURE_INFO:
self._add_section(section)

self.prs.save(self.buffer)
return self.buffer.getvalue()
Expand Down