[lc_ldap] Corrections de bugs, et cohérence de code.
This commit is contained in:
parent
6d4d56db72
commit
7ed1874d62
4 changed files with 26 additions and 14 deletions
|
@ -48,7 +48,7 @@ import random
|
|||
import string
|
||||
from unicodedata import normalize
|
||||
from crans_utils import format_tel, format_mac, mailexist, validate_name, ip4_of_rid, ip6_of_mac, fetch_cert_info
|
||||
from crans_utils import toGeneralizedTimeFormat, fromGeneralizedTimeFormat, extractTz
|
||||
from crans_utils import to_generalized_time_format, from_generalized_time_format
|
||||
import itertools
|
||||
|
||||
sys.path.append("/usr/scripts")
|
||||
|
@ -457,6 +457,7 @@ class uid(Attr):
|
|||
legend = u"L'identifiant canonique de l'adhérent"
|
||||
category = 'perso'
|
||||
unique = True
|
||||
can_modify = [nounou]
|
||||
ldap_name = "uid"
|
||||
|
||||
@crans_attribute
|
||||
|
@ -601,13 +602,13 @@ class generalizedTimeFormat(Attr):
|
|||
if isinstance(gtf, str) or isinstance(gtf, unicode):
|
||||
if not ('Z' in gtf or '+' in gtf or '-' in gtf):
|
||||
self._stamp = gtf
|
||||
self.value = toGeneralizedTimeFormat(float(gtf))
|
||||
self.value = to_generalized_time_format(float(gtf))
|
||||
else:
|
||||
self._stamp = fromGeneralizedTimeFormat(gtf)
|
||||
self._stamp = from_generalized_time_format(gtf)
|
||||
self.value = gtf
|
||||
elif isinstance(gtf, float):
|
||||
self._stamp = gtf
|
||||
self.value = toGeneralizedTimeFormat(gtf)
|
||||
self.value = to_generalized_time_format(gtf)
|
||||
|
||||
@crans_attribute
|
||||
class debutAdhesion(generalizedTimeFormat):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue