From dc32ae6ad26e104d71f99bf3967fc5aa9e1d1c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20P=C3=A9pin?= Date: Fri, 23 Dec 2016 09:37:54 +0100 Subject: [PATCH] =?UTF-8?q?R=C3=A9pare=20le=20traitement=20des=20petits=20?= =?UTF-8?q?cours?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Les fonctions de traitement des demandes faisaient des cast étranges à l'aide de `base64`. Ça devrait être lié à python2 je suppose. --- gestioncof/petits_cours_views.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gestioncof/petits_cours_views.py b/gestioncof/petits_cours_views.py index 303cec2c..ee71d1a9 100644 --- a/gestioncof/petits_cours_views.py +++ b/gestioncof/petits_cours_views.py @@ -146,9 +146,7 @@ def _finalize_traitement(request, demande, proposals, proposed_for, "proposed_for": proposed_for, "proposed_mails": proposed_mails, "mainmail": mainmail, - "attribdata": - base64.b64encode(json.dumps(attribdata) - .encode('utf_8')), + "attribdata": json.dumps(attribdata), "redo": redo, "errors": errors, }) @@ -258,7 +256,7 @@ def _traitement_post(request, demande): extra = request.POST["extra"].strip() redo = "redo" in request.POST attribdata = request.POST["attribdata"] - attribdata = dict(json.loads(base64.b64decode(attribdata))) + attribdata = dict(json.loads(attribdata)) for matiere in demande.matieres.all(): if matiere.id not in attribdata: unsatisfied.append(matiere)