fix uidNumber for three/four digit uids
[uccvend-vendserver.git] / 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