fix uidNumber for three/four digit uids
authorDavid Adam <zanchey@ucc.gu.uwa.edu.au>
Fri, 4 Apr 2008 14:36:51 +0000 (14:36 +0000)
committerDavid Adam <zanchey@ucc.gu.uwa.edu.au>
Fri, 4 Apr 2008 14:36:51 +0000 (14:36 +0000)
sql-edition/servers/LDAPConnector.py

index 1f35c20..9e3a307 100644 (file)
@@ -39,6 +39,8 @@ def get_uid(card_id):
 def set_card_id(uidNumber, card_id):
         ldapconn = get_ldap_connection()
         
+       # fix uidNumber for three/four digit uids
+       uidNumber = str(int(uidNumber))
         basedn = 'ou=People,dc=ucc,dc=gu,dc=uwa,dc=edu,dc=au'
         filter = ldap.filter.filter_format('(uidNumber=%s)', (uidNumber, ))
         attrs = ('objectClass', )

UCC git Repository :: git.ucc.asn.au