diff --git a/attributs.py b/attributs.py index f1eb489..089ae12 100644 --- a/attributs.py +++ b/attributs.py @@ -254,14 +254,23 @@ class chbre(Attr): can_modify = ["self", "Cableur", "Nounou"] def parse_value(self, val, ldif): + if u'club' in ldif['objectClass']: + if val in annuaires_pg.locaux_clubs(): + self.value = val + return + else: + raise ValueError("Club devrait etre en XclN, pas en %s" % val) + if val in (u"EXT", u"????"): self.value = val return + try: annuaires_pg.chbre_prises(val[0], val[1:]) except NameError: import annuaires_pg_test annuaires_pg_test.chbre_prises(val[0], val[1:]) + self.value = val class droits(Attr):