From fa1cb73e607fbf6cb815a2adf604ff5733e3b67f Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Sun, 17 Oct 2010 15:15:36 +0200 Subject: [PATCH] [attributs] aid dans CRANS_ATTRIBUTES --- attributs.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/attributs.py b/attributs.py index 3d2fc3f..56920f0 100644 --- a/attributs.py +++ b/attributs.py @@ -133,6 +133,18 @@ class objectClass(Attr): self.value = unicode(val) +class aid(Attr): + singlevalue = True + optional = True + legend = u"Identifiant de l'adhérent" + + def parse_value(self, aid, ldif): + self.value = int(aid) + + def __unicode__(self): + return unicode(self.value) + + class nom(Attr): singlevalue = True optional = False @@ -409,6 +421,7 @@ class historique(Attr): CRANS_ATTRIBUTES= { 'objectClass' : objectClass, +'aid': aid, 'nom' : nom, 'prenom' : prenom, 'tel' : tel,