From 61c8c705ce4ed510c0ed882b683ecc0e285f6796 Mon Sep 17 00:00:00 2001 From: Vincent Le Gallic Date: Tue, 15 Jan 2013 15:08:59 +0100 Subject: [PATCH] =?UTF-8?q?[ldap=5Fcrans]=20gest=5Fcrans=20crashait=20sur?= =?UTF-8?q?=20une=20erreur=20unicode.=20Maintenant=20on=20a=20de=20l'APF42?= =?UTF-8?q?42(4242)=20dans=20la=20console,=20mais=20au=20moins=20=C3=A7a?= =?UTF-8?q?=20crashe=20plus.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Ignore-this: 851d5fc4dd378ef67df0253e9d8e2f58 darcs-hash:20130115140859-2c9c1-bd995e5c38bc9c658af61432aab0ea6a4366de50.gz --- gestion/ldap_crans.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gestion/ldap_crans.py b/gestion/ldap_crans.py index 43aeac78..7e0846b1 100644 --- a/gestion/ldap_crans.py +++ b/gestion/ldap_crans.py @@ -319,7 +319,7 @@ class Service: dates = u" à partir d%s %s" % (dates.startswith(u"maintenant") and u"e" or u"u", dates) return (u"%s(%s)%s" % (self.nom, - u','.join(self.args), + u','.join([i.decode("UTF-8") for i in self.args]), dates)).replace(u" et maintenant", u"") def __str__(self): @@ -1298,7 +1298,7 @@ class BaseClasseCrans(CransLdap): vidns.append(int(r[4:])) if self.idn == 'fid' or self.idn == 'aid': # Pour une facture on prend un nouveau numéro - vidn = max([0] + vidns)+1 + vidn = max([0] + vidns) + 1 else: # Sinon on prend le premier libre while vidn in vidns: