Ignore:
Timestamp:
29 Sep 2021, 10:21:24 (3 years ago)
Author:
Henrik Bettermann
Message:

Extend exporter.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.iuokada/trunk/src/kofacustom/iuokada/applicants/export.py

    r16626 r16653  
    4141        ))) + (
    4242        'password', 'state', 'history', 'container_code', 'application_number',
    43         'display_fullname', 'application_date', 'dept',)
     43        'display_fullname', 'application_date', 'department', 'college',)
    4444
    4545    def mangle_value(self, value, name, context=None):
    46         if name == 'dept' and context is not None:
     46        if name in ('department', 'college') and context is not None:
    4747            course_admitted = getattr(context, 'course_admitted', None)
    4848            if course_admitted is not None:
    4949                try:
    50                     value = course_admitted.__parent__.__parent__.code
     50                    if name == 'department':
     51                        value = course_admitted.__parent__.__parent__.title
     52                    else:
     53                        value = course_admitted.__parent__.__parent__.__parent__.title
    5154                except AttributeError:
    5255                    value = 'N/A'
Note: See TracChangeset for help on using the changeset viewer.