Ignore:
Timestamp:
23 Aug 2018, 06:43:06 (6 years ago)
Author:
Henrik Bettermann
Message:

Implement the upload of pdf files in application section.

File:
1 edited

Legend:

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

    r14829 r15113  
    1919import grok
    2020from zope.interface import implementedBy
     21from zope.component import getUtility
     22from waeup.kofa.interfaces import IExtFileStore
    2123from waeup.kofa.applicants.applicant import ApplicantFactory
    2224from waeup.kofa.utils.helpers import attrs_to_fields
     
    2527    ICustomApplicant, ICustomUGApplicantEdit, ICustomPGApplicantEdit,
    2628    IPUTMEApplicantEdit, ITranscriptApplicant, ICertificateRequest)
     29
     30@grok.subscribe(ICustomApplicant, grok.IObjectRemovedEvent)
     31def custom_handle_applicant_removed(applicant, event):
     32    """If an applicant is removed also pdf files of this applicant are removed.
     33    """
     34    file_store = getUtility(IExtFileStore)
     35    file_store.deleteFileByContext(applicant, attr='stateresult.pdf')
     36    return
    2737
    2838class CustomApplicant(NigeriaApplicant):
Note: See TracChangeset for help on using the changeset viewer.