Changeset 7374 for main/waeup.sirp/trunk/src/waeup/sirp/applicants/root.py
- Timestamp:
- 18 Dec 2011, 11:20:19 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.sirp/trunk/src/waeup/sirp/applicants/root.py
r7321 r7374 102 102 return 103 103 104 def get_applicant_data(identifier):105 """Get applicant data associated with `identifier`.106 107 Returns the applicant object if successful and ``None`` else.108 109 As `identifier` we expect an access code in format110 like ``PREFIX-XXX-YYYYYYYY`` where ``PREFIX`` is something like111 ``APP`` or ``PUDE``, ``XXX`` the access code series and112 ``YYYYYYYYYY`` the real accesscode number.113 114 This function requires a fully blown setup as it does catalog115 lookups for finding applicants.116 """117 query = getUtility(IQuery)118 results = list(query.searchResults(119 Eq(('applicants_catalog', 'access_code'), identifier)120 ))121 if len(results) == 0:122 return None123 return results[0]124 125 104 def application_exists(identifier): 126 105 """Check whether an application for the given identifier already
Note: See TracChangeset for help on using the changeset viewer.