From 0ca363738e38d45dde46e9d040da3939c24ba36b Mon Sep 17 00:00:00 2001 From: Emmanuel Viennet Date: Sat, 26 Jun 2021 09:34:49 +0200 Subject: [PATCH] Fix: content-type of page with SVG graph --- sco_report.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/sco_report.py b/sco_report.py index 26ebb865..631fcfc9 100644 --- a/sco_report.py +++ b/sco_report.py @@ -708,14 +708,16 @@ def formsemestre_suivi_cohorte( return t base_url = REQUEST.URL0 - burl = ( - "%s?formsemestre_id=%s&bac=%s&bacspecialite=%s&civilite=%s&statut=%s" - % (base_url, formsemestre_id, bac, bacspecialite, civilite, statut) + burl = "%s?formsemestre_id=%s&bac=%s&bacspecialite=%s&civilite=%s&statut=%s" % ( + base_url, + formsemestre_id, + bac, + bacspecialite, + civilite, + statut, ) if percent: - pplink = ( - '

Afficher les résultats bruts

' % burl - ) + pplink = '

Afficher les résultats bruts

' % burl else: pplink = ( '

Afficher les résultats en pourcentages

' @@ -1571,7 +1573,6 @@ def formsemestre_graph_parcours( % MAX_ETUD_IN_DESCR, context.sco_footer(REQUEST), ] - REQUEST.RESPONSE.setHeader("content-type", "application/xhtml+xml") return "\n".join(H) else: raise ValueError("invalid format: %s" % format)