Changeset 8225 for main/waeup.kofa/trunk
- Timestamp:
- 19 Apr 2012, 20:02:24 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/students/batching.py
r8221 r8225 261 261 262 262 def getParent(self, row, site): 263 NON_VALUES = ['', IGNORE_MARKER] 263 264 if not 'students' in site.keys(): 264 265 return None 265 if 'student_id' in row.keys() and row['student_id']:266 if row.get('student_id', '') not in NON_VALUES: 266 267 if row['student_id'] in site['students']: 267 268 student = site['students'][row['student_id']] 268 269 return student 269 elif 'reg_number' in row.keys() and row['reg_number']:270 elif row.get('reg_number', '') not in NON_VALUES: 270 271 reg_number = row['reg_number'] 271 272 cat = queryUtility(ICatalog, name='students_catalog') … … 274 275 if results: 275 276 return results[0] 276 elif 'matric_number' in row.keys() and row['matric_number']:277 elif row.get('matric_number', '') not in NON_VALUES: 277 278 matric_number = row['matric_number'] 278 279 cat = queryUtility(ICatalog, name='students_catalog')
Note: See TracChangeset for help on using the changeset viewer.