Export: Klassifizierung (offen/dienstgebrauch/vertraulich) komplett entfernt
Dieser Commit ist enthalten in:
@@ -635,7 +635,6 @@ async def export_incident(
|
||||
incident_id: int,
|
||||
format: str = Query("pdf", pattern="^(pdf|docx)$"),
|
||||
scope: str = Query("report", pattern="^(summary|report|full)$"),
|
||||
classification: str = Query("offen", pattern="^(offen|dienstgebrauch|vertraulich)$"),
|
||||
current_user: dict = Depends(get_current_user),
|
||||
db: aiosqlite.Connection = Depends(db_dependency),
|
||||
):
|
||||
@@ -690,7 +689,7 @@ async def export_incident(
|
||||
scope_labels = {"summary": "executive_summary", "report": "lagebericht", "full": "vollstaendig"}
|
||||
|
||||
if format == "pdf":
|
||||
pdf_bytes = await generate_pdf(incident, articles, fact_checks, snapshots, scope, classification, creator, exec_summary)
|
||||
pdf_bytes = await generate_pdf(incident, articles, fact_checks, snapshots, scope, creator, exec_summary)
|
||||
filename = f"{slug}_{scope_labels[scope]}_{date_str}.pdf"
|
||||
return StreamingResponse(
|
||||
io.BytesIO(pdf_bytes),
|
||||
@@ -698,7 +697,7 @@ async def export_incident(
|
||||
headers={"Content-Disposition": f'attachment; filename="{filename}"'},
|
||||
)
|
||||
else:
|
||||
docx_bytes = await generate_docx(incident, articles, fact_checks, snapshots, scope, classification, creator, exec_summary)
|
||||
docx_bytes = await generate_docx(incident, articles, fact_checks, snapshots, scope, creator, exec_summary)
|
||||
filename = f"{slug}_{scope_labels[scope]}_{date_str}.docx"
|
||||
return StreamingResponse(
|
||||
io.BytesIO(docx_bytes),
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren