Ignore:
Timestamp:
11 May 2024, 19:52:43 (8 months ago)
Author:
Henrik Bettermann
Message:

ApplicantProcessor?: import applicant history

File:
1 edited

Legend:

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

    r17705 r17762  
    2121import grok
    2222from time import time
     23from ast import literal_eval
    2324import unicodecsv
    2425from zope.schema import getFields
     
    110111    def available_fields(self):
    111112        return sorted(list(set(
    112             ['application_number',
     113            ['application_number', 'history',
    113114            'container_code','state','password'] + getFields(
    114115                self.iface).keys())))
     
    260261            row.pop('password')
    261262
     263        # Replace entire history
     264        if 'history' in row:
     265            new_history = row.get('history', IGNORE_MARKER)
     266            if new_history not in (IGNORE_MARKER, ''):
     267                history = IObjectHistory(obj)
     268                history._annotations[
     269                    history.history_key] = literal_eval(new_history)
     270                items_changed += ('%s=%s, ' % ('history', new_history))
     271            row.pop('history')
     272
    262273        # Update registration state
    263274        if 'state' in row:
Note: See TracChangeset for help on using the changeset viewer.