cjber commited on
Commit
407dd62
·
1 Parent(s): 8991b0e

fix: fix filenames

Browse files
Files changed (2) hide show
  1. app.py +6 -3
  2. planning_ai/documents/document.py +3 -3
app.py CHANGED
@@ -361,9 +361,12 @@ def display_download_buttons(rep):
361
  st.markdown("---")
362
  # Create a container for the Executive Reports
363
  with st.expander("**Executive Reports**"):
364
- summaries_pdf_path = Paths.SUMMARY / f"Overview_of_Public_Submissions-{rep}.pdf"
 
 
 
365
  summaries_docx_path = (
366
- Paths.SUMMARY / f"Overview_of_Public_Submissions-{rep}.docx"
367
  )
368
  with st.container():
369
  st.subheader(f"Executive Report for {rep}")
@@ -383,7 +386,7 @@ def display_download_buttons(rep):
383
  st.download_button(
384
  label="Download DOCX Version",
385
  data=docx_file,
386
- file_name=f"Overview_of_Public_Submissions-{rep}.docx",
387
  mime="application/vnd.openxmlformats-officedocument.wordprocessingml.document",
388
  use_container_width=True,
389
  key=f"exec_docx_{hash(rep)}",
 
361
  st.markdown("---")
362
  # Create a container for the Executive Reports
363
  with st.expander("**Executive Reports**"):
364
+ rep_joined = rep.replace(" ", "_")
365
+ summaries_pdf_path = (
366
+ Paths.SUMMARY / f"Overview_of_Public_Submissions-{rep_joined}.pdf"
367
+ )
368
  summaries_docx_path = (
369
+ Paths.SUMMARY / f"Overview_of_Public_Submissions-{rep_joined}.docx"
370
  )
371
  with st.container():
372
  st.subheader(f"Executive Report for {rep}")
 
386
  st.download_button(
387
  label="Download DOCX Version",
388
  data=docx_file,
389
+ file_name=f"Overview_of_Public_Submissions-{rep_joined}.docx",
390
  mime="application/vnd.openxmlformats-officedocument.wordprocessingml.document",
391
  use_container_width=True,
392
  key=f"exec_docx_{hash(rep)}",
planning_ai/documents/document.py CHANGED
@@ -434,13 +434,13 @@ header-includes: |
434
  f"{themes_paragraph}\n\n"
435
  f": Breakdown of representations by section\n\n{themes}\n\n"
436
  "## Supporting Representations\n\n"
437
- "The following section presents a list of all points raised in representations that support the consultation document, grouped by sections."
438
  f"{support_policies or '_No supporting representations._'}\n\n"
439
  "## Objecting Representations\n\n"
440
- "The following section presents a list of all points raised in representations that object to the consultation document, grouped by sections."
441
  f"{object_policies or '_No objecting representations._'}\n\n"
442
  "## Comment\n\n"
443
- "The following section presents a list of all points raised in representations that do not support or object to the consultation document, grouped by sections."
444
  f"{other_policies or '_No other representations._'}\n\n"
445
  )
446
 
 
434
  f"{themes_paragraph}\n\n"
435
  f": Breakdown of representations by section\n\n{themes}\n\n"
436
  "## Supporting Representations\n\n"
437
+ "The following section presents a list of all points raised in representations that support the consultation document, grouped by sections.\n\n"
438
  f"{support_policies or '_No supporting representations._'}\n\n"
439
  "## Objecting Representations\n\n"
440
+ "The following section presents a list of all points raised in representations that object to the consultation document, grouped by sections.\n\n"
441
  f"{object_policies or '_No objecting representations._'}\n\n"
442
  "## Comment\n\n"
443
+ "The following section presents a list of all points raised in representations that do not support or object to the consultation document, grouped by sections.\n\n"
444
  f"{other_policies or '_No other representations._'}\n\n"
445
  )
446