- Timestamp:
- 22 Feb 2008, 08:34:18 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
WAeUP_SRP/base/WAeUPTool.py
r3195 r3198 58 58 i_home = INSTANCE_HOME 59 59 images_base = os.path.join(i_home,"images") 60 EMPTY = 'XXX' 60 61 61 62 def getImagesDir(student_id): … … 858 859 students_folder = self.portal_url.getPortalObject().campus.students 859 860 logger = logging.getLogger('WAeUPTool.admitOneStudent') 861 res = self.students_catalog(jamb_reg_no = brain.reg_no) 862 if res: 863 logger.info('student with this reg_no already exists %s with id %s' % (brain.reg_no,res[0].id)) 864 return 860 865 if brain.status != "admitted": 861 866 logger.info('status of %s is %s' % (brain.reg_no,brain.status)) … … 1464 1469 for record in items: 1465 1470 item = {} 1471 empty_value_keys = [] 1466 1472 for k,v in record.items(): 1467 1473 if v: 1474 if v == EMPTY: 1475 empty_value_keys += k, 1476 v = '' 1468 1477 item[k.strip()] = v.strip() 1469 1478 count += 1 … … 1503 1512 error = results[1] 1504 1513 mapping = results[2] 1514 for k in empty_value_keys: 1515 mapping[k] = EMPTY 1505 1516 if mapping.has_key('sex'): 1506 1517 #import pdb;pdb.set_trace()
Note: See TracChangeset for help on using the changeset viewer.