Changeset 7417 for main


Ignore:
Timestamp:
21 Dec 2011, 07:29:05 (13 years ago)
Author:
uli
Message:

A faster and shorter way to check for applicant image existence.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.sirp/trunk/src/waeup/sirp/applicants/applicant.py

    r7412 r7417  
    134134        file_store = getUtility(IExtFileStore)
    135135        appl_file = file_store.getFileByContext(self)
     136        if appl_file is None:
     137            return
    136138        stud_file_id = IFileStoreNameChooser(student).chooseName(
    137139            attr="passport.jpg")
    138         try:
    139             file_store.createFile(stud_file_id, appl_file)
    140         except AttributeError:
    141             # Pass if passport picture doesn't exist
    142             pass
     140        file_store.createFile(stud_file_id, appl_file)
    143141        return
    144142
Note: See TracChangeset for help on using the changeset viewer.