Façon plus jolie de tester l'existance d'un attribut lc_ldap
This commit is contained in:
parent
2c72dce85d
commit
2514cb0a18
2 changed files with 3 additions and 4 deletions
|
@ -18,8 +18,7 @@ try:
|
|||
if codes:
|
||||
sys.stdout.write(codes[0])
|
||||
else:
|
||||
droits = [str(d) for d in adh.get('droits', [])]
|
||||
if imprimeur in droits or nounou in droits:
|
||||
if imprimeur in adh['droits'] or nounou in adh['droits']:
|
||||
code = digicode.gen_code(login)
|
||||
sys.stdout.write(str(code))
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue