From: Dan Scott Date: Mon, 12 Sep 2011 21:27:46 +0000 (-0400) Subject: Handle new 'Proxy' lulAffiliation a bit more gracefully X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dfe704f7eabdbf7ce599b5b212beae32d4b41b43;p=contrib%2FConifer.git Handle new 'Proxy' lulAffiliation a bit more gracefully In general, if we don't have an explicit profile, just return. Signed-off-by: Dan Scott Signed-off-by: Dan Scott --- diff --git a/tools/patron-load/ldap_osrf_sync b/tools/patron-load/ldap_osrf_sync index 420936a35a..3601958277 100644 --- a/tools/patron-load/ldap_osrf_sync +++ b/tools/patron-load/ldap_osrf_sync @@ -156,6 +156,9 @@ class User: return 11 elif affiliation == 'staff': return 15 + elif affiliation == 'proxy': + return None + return None def get_home_ou(self): """ @@ -433,6 +436,10 @@ def create_evergreen_user(auth, result_data): if not user: return + if user.profile is None: + print >> sys.stderr, "No profile set for %s" % user.usrname + return + found = find_evergreen_user(auth, user) if found: print("Found: %s" % user.usrname)