[gest_crans, ldap_crans, whos] Robustesse si le responsable d'un club a été supprimé
Ignore-this: dbb616fe0cff5ba356ec8b2a0587f96c darcs-hash:20111006133157-ffbb2-9429c7756fb617b4e12babf3945d80333fe3f1af.gz
This commit is contained in:
parent
9892e46c2f
commit
6c85740dd2
3 changed files with 24 additions and 8 deletions
|
@ -2414,7 +2414,7 @@ class Adherent(BaseProprietaire):
|
|||
diff = [droit for droit in (ancien + new)
|
||||
if (droit not in ancien or droit not in new) and (droit in droits_critiques)]
|
||||
if len(diff) > 0:
|
||||
raise("Droits critiques modifies (?) :: %s" % ','.join(diff))
|
||||
raise ValueError("Droits critiques modifies (?) :: %s" % ','.join(diff))
|
||||
|
||||
# Sauvegarde
|
||||
if new != self._data.get('droits', []):
|
||||
|
@ -2531,8 +2531,12 @@ class Club(BaseProprietaire):
|
|||
if adher == None:
|
||||
aid = decode(self._data.get('responsable', [''])[0])
|
||||
if aid:
|
||||
return self.search('aid=%s' % aid)['adherent'][0]
|
||||
else: return ''
|
||||
l = self.search('aid=%s' % aid)['adherent']
|
||||
if l:
|
||||
return l[0]
|
||||
else:
|
||||
raise ValueError("Responsable Invalide (%s)" % aid)
|
||||
else: raise ValueError("Pas de responsable enregistré")
|
||||
|
||||
if adher.__class__ != Adherent:
|
||||
raise ValueError
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue