Changeset 5468
- Timestamp:
- 22 Aug 2010, 18:09:52 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/jambtables/util.py
r5451 r5468 23 23 """ 24 24 import grok 25 from waeup.sirp.accesscodes import get_access_code 25 26 26 27 def get_applicant_data(reg_no, ac): … … 36 37 """ 37 38 site = grok.getSite() 38 if reg_no not in site['applications'].keys(): 39 return None 40 applicant_data = site['applications'][reg_no] 41 entries = site['accesscodes'].search(ac, 'pin') 42 if len(entries) != 1: 43 # XXX: If entries > 1 then we have a problem! 44 return None 45 # XXX: Maybe we have to mark reg_no as used here? 46 return (applicant_data, entries[0]) 39 if reg_no is not None: 40 applicant_data = site['applications'].get(reg_no, None) 41 else: 42 # Non-JAMB-screened applicants are stored by ac as key... 43 applicant_data = site['applications'].get(ac, None) 44 access_code = get_access_code(ac) 45 return (applicant_data, access_code) 47 46 48 47 def application_exists(identifier):
Note: See TracChangeset for help on using the changeset viewer.