From: Dan Scott Date: Thu, 29 Aug 2019 17:00:18 +0000 (-0400) Subject: Robustify in face of new affiliation: "Collaboration" X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=3cf9169f93082cbe4f55c97ee227d04322dcaa85;p=contrib%2FConifer.git Robustify in face of new affiliation: "Collaboration" Also map "Collaboration" to the same as "Affiliate" (Staff). Signed-off-by: Dan Scott --- diff --git a/tools/patron-load/ldap_osrf_sync b/tools/patron-load/ldap_osrf_sync index ebd1725881..1bc53fc915 100755 --- a/tools/patron-load/ldap_osrf_sync +++ b/tools/patron-load/ldap_osrf_sync @@ -187,6 +187,7 @@ class User: 'proxy': None, 'retired': None, 'affiliate': 115, + 'collaboration': 115, 'visitor': 113 } @@ -204,11 +205,14 @@ class User: self.affiliation = 'gr' else: self.affiliation = 'ug' + else: + self.affiliation = affiliation else: - self.affiliation = affiliation + print >> sys.stderr, "Affiliation '%s' not mapped to a profile " \ + "for user %s" % (affiliation, self.ldap_atts) if hasattr(self, 'affiliation'): - return profile_map[affiliation] + return profile_map[self.affiliation] if 'empl' in self.cname.lower(): affiliation = 'staff'