From 89a43cc49aec781216ad3b50acb75c98a5a539ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre-Elliott=20B=C3=A9cue?= Date: Wed, 15 May 2013 00:15:45 +0200 Subject: [PATCH] =?UTF-8?q?[attributs]=20mail=20est=20multivalu=C3=A9,=20e?= =?UTF-8?q?tudes=20est=20optionnel,=20et=20solde=20peut=20=C3=AAtre=20<0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- attributs.py | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/attributs.py b/attributs.py index 95f0114..dde2227 100644 --- a/attributs.py +++ b/attributs.py @@ -342,7 +342,7 @@ class derniereConnexion(intAttr): can_modify = [] class mail(Attr): - singlevalue = True + singlevalue = False optional = False unique = True legend = "Le mail de l'adhérent" @@ -430,7 +430,7 @@ class contourneGreylist(boolAttr): class etudes(Attr): singlevalue = False - optional = False + optional = True legend = u"Études" can_modify = [soi, cableur, nounou] category = 'perso' @@ -499,8 +499,8 @@ class solde(Attr): def parse_value(self, solde): # on évite les dépassements, sauf si on nous dit de ne pas vérifier - if not (float(solde) >= config.impression.decouvert and float(solde) <= 1024.): - raise ValueError("Solde invalide: %r" % solde) + #if not (float(solde) >= config.impression.decouvert and float(solde) <= 1024.): + # raise ValueError("Solde invalide: %r" % solde) self.value = solde class dnsAttr(Attr): @@ -1009,10 +1009,7 @@ class controle(Attr): def parse_value(self, ctrl): if ctrl not in [u"", u"c", u"p", u"cp", u"pc"]: raise ValueError("control peut prendre les valeurs [c][p]") - if ctrl == u'cp': - self.value = u'pc' - else: - self.value = ctrl + self.value = ctrl class fid(intAttr): legend = u"Id de facture"