Ignore:
Timestamp:
11 May 2024, 07:45:54 (4 months ago)
Author:
Henrik Bettermann
Message:

Mangle referees and school grades.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/applicants/export.py

    r16431 r17760  
    2323from waeup.kofa.applicants.interfaces import (
    2424    IApplicantBaseData, IApplicantsContainer, IApplicantOnlinePayment,
    25     IApplicantRefereeReport)
     25    IApplicantRefereeReport, IApplicant)
    2626from waeup.kofa.interfaces import ICSVExporter
    2727from waeup.kofa.interfaces import MessageFactory as _
     
    8080    grok.name('applicants')
    8181
    82     fields = tuple(sorted(iface_names(IApplicantBaseData))) + (
     82    fields = tuple(sorted(iface_names(IApplicant))) + (
    8383        'password', 'state', 'history', 'container_code', 'application_number',
    8484        'display_fullname', 'application_date')
     
    9393        if name.startswith('course') and value is not None:
    9494            value = value.code
    95         #elif name == 'school_grades':
    96         #    value = [eval(entry.to_string()) for entry in value]
     95        elif name == 'school_grades' and value is not None:
     96            value = [eval(entry.to_string()) for entry in value]
     97        elif name == 'referees' and value is not None:
     98            value = [eval(entry.to_string()) for entry in value]
    9799        elif name == 'history':
    98100            value = getattr(value, 'messages', None)
Note: See TracChangeset for help on using the changeset viewer.