From 026b2af4d618997f7e574c92196f93f225f1582b Mon Sep 17 00:00:00 2001 From: David Adam Date: Fri, 4 Apr 2008 14:36:51 +0000 Subject: [PATCH] fix uidNumber for three/four digit uids --- sql-edition/servers/LDAPConnector.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sql-edition/servers/LDAPConnector.py b/sql-edition/servers/LDAPConnector.py index 1f35c20..9e3a307 100644 --- a/sql-edition/servers/LDAPConnector.py +++ b/sql-edition/servers/LDAPConnector.py @@ -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', ) -- 2.20.1