Changeset 16481 for main/waeup.uniben/trunk/src/waeup/uniben
- Timestamp:
- 12 May 2021, 14:58:45 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/applicants/applicant.py
r16229 r16481 19 19 import grok 20 20 from zope.interface import implementedBy 21 from zope.component import getUtility 22 from waeup.kofa.interfaces import IExtFileStore 21 23 from waeup.kofa.applicants.applicant import ApplicantFactory 22 24 from waeup.kofa.utils.helpers import attrs_to_fields … … 59 61 return False 60 62 63 def _copyPassportImage(self, student): 64 """Copy any passport image over to student location. 65 """ 66 file_store = getUtility(IExtFileStore) 67 appl_file = file_store.getFileByContext(self) 68 if appl_file is None: 69 return 70 fname = 'passport.jpg' 71 # In Uniben we save JAMB pictures as passport2.jpg. 72 if getattr(self.__parent__, 'prefix', None) in ('ase', 'pude'): 73 fname = 'passport2.jpg' 74 stud_file_id = IFileStoreNameChooser(student).chooseName( 75 attr=fname) 76 file_store.createFile(stud_file_id, appl_file) 77 return 78 61 79 # Set all attributes of CustomApplicant required in ICustomApplicant as field 62 80 # properties. Doing this, we do not have to set initial attributes
Note: See TracChangeset for help on using the changeset viewer.