Commit f7646342 authored by Maxime Bombar's avatar Maxime Bombar

Problème de parenthésage

parent df93f2c1
...@@ -665,7 +665,7 @@ def modifier_compte(request, sock, kwargs): ...@@ -665,7 +665,7 @@ def modifier_compte(request, sock, kwargs):
# avec des virgules et des cases à cocher # avec des virgules et des cases à cocher
for champ in ["droits", "surdroits"]: for champ in ["droits", "surdroits"]:
n = len(champ) + 1 n = len(champ) + 1
droitsousur = [case[n:] for (case, valeur) in request.POST.items() if case.startswith("{}_".format(champ) and (valeur == "on")]) droitsousur = [case[n:] for (case, valeur) in request.POST.items() if case.startswith("{}_".format(champ)) and (valeur == "on")]
liste = compte[champ] liste = compte[champ]
if set(droitsousur) != set(liste): if set(droitsousur) != set(liste):
tosend[champ] = u",".join(droitsousur) tosend[champ] = u",".join(droitsousur)
...@@ -1858,7 +1858,7 @@ def TresorerieAjoutRemise(request,sock,kwargs): ...@@ -1858,7 +1858,7 @@ def TresorerieAjoutRemise(request,sock,kwargs):
if request.method == "POST" : if request.method == "POST" :
form = forms.AjoutRemise(request.POST) form = forms.AjoutRemise(request.POST)
idr = utilities._get_remise(sock) idr = utilities._get_remise(sock)
form.fields["idremise"].choices = [(i, "Remise {}".format(i) for i in idr ]) form.fields["idremise"].choices = [(i, "Remise {}".format(i)) for i in idr ]
if form.is_valid() : if form.is_valid() :
dico.update(form.cleaned_data) dico.update(form.cleaned_data)
sock.write(json.dumps(["ajout_remise",dico])) sock.write(json.dumps(["ajout_remise",dico]))
...@@ -1887,7 +1887,7 @@ def TresorerieAjoutRemise(request,sock,kwargs): ...@@ -1887,7 +1887,7 @@ def TresorerieAjoutRemise(request,sock,kwargs):
} }
idr = utilities._get_remise(sock) idr = utilities._get_remise(sock)
form = forms.AjoutRemise(initial=initial_data) form = forms.AjoutRemise(initial=initial_data)
form.fields["idremise"].choices = [(i, "Remise {}".format(i) for i in idr ]) form.fields["idremise"].choices = [(i, "Remise {}".format(i)) for i in idr ]
variables["form"] = form variables["form"] = form
variables["cheque"] = True variables["cheque"] = True
return (variables, 'note/trez_ajout.html') return (variables, 'note/trez_ajout.html')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment