Prefer primary affiliation over student level feature/tools_2_4
authorDan Scott <dscott@laurentian.ca>
Tue, 17 Jan 2017 14:33:48 +0000 (09:33 -0500)
committerDan Scott <dscott@laurentian.ca>
Tue, 17 Jan 2017 14:33:48 +0000 (09:33 -0500)
When figuring out the intended profile for a given account, let primary
affiliation win; we have accounts that started as students and are now back as
faculty, and the lulStudentLevel still identifies them as undergrads. That
ain't right!

Signed-off-by: Dan Scott <dscott@laurentian.ca>
tools/patron-load/ldap_osrf_sync

index 929732c..f1ec115 100755 (executable)
@@ -195,7 +195,7 @@ class User:
             'visitor': 113
         }
 
-        for att in ('lulStudentLevel', 'lulPrimaryAffiliation', 'lulAffiliation'):
+        for att in ('lulPrimaryAffiliation', 'lulStudentLevel', 'lulAffiliation'):
             if att in self.ldap_atts:
                 affiliation = self._simple_map(att).lower()
                 if affiliation in profile_map: