Ignore:
Timestamp:
1 Oct 2019, 08:46:59 (5 years ago)
Author:
Henrik Bettermann
Message:

Take DELETION_MARKER into consideration when updating passwords.

File:
1 edited

Legend:

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

    r14804 r15628  
    2727from zope.catalog.interfaces import ICatalog
    2828from waeup.kofa.interfaces import (
    29     IBatchProcessor, IObjectConverter, FatalCSVError, IGNORE_MARKER,
     29    IBatchProcessor, IObjectConverter, FatalCSVError,
     30    IGNORE_MARKER, DELETION_MARKER,
    3031    IObjectHistory, IUserAccount, DuplicationError)
    3132from waeup.kofa.interfaces import MessageFactory as _
     
    243244            row.pop('application_number')
    244245
    245         # Update password
     246        # Update
    246247        if 'password' in row:
    247248            passwd = row.get('password', IGNORE_MARKER)
     
    250251                    # already encrypted password
    251252                    obj.password = passwd
     253                elif passwd == DELETION_MARKER:
     254                    obj.password = None
    252255                else:
    253256                    # not yet encrypted password
Note: See TracChangeset for help on using the changeset viewer.