Ignore:
Timestamp:
10 May 2012, 18:54:28 (13 years ago)
Author:
Henrik Bettermann
Message:

We do not need to set new attributes in instances of classes when using attrs_to_fields. It's only commented out because I'd like to leave this here for a while to remember this alternative solution.

File:
1 edited

Legend:

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

    r8388 r8412  
    8787            items = getFields(IApplicantsRoot).items()
    8888            nothing_to_do = True
    89             for i in items:
    90                 if not hasattr(app_folder,i[0]):
    91                     nothing_to_do = False
    92                     setattr(app_folder,i[0],i[1].missing_value)
    93                     logger.info(
    94                         '%s: %s added to root.' % (self.log_prefix,i[0]))
     89            #for i in items:
     90            #    if not hasattr(app_folder,i[0]):
     91            #        nothing_to_do = False
     92            #        setattr(app_folder,i[0],i[1].missing_value)
     93            #        logger.info(
     94            #            '%s: %s added to root.' % (self.log_prefix,i[0]))
    9595            # can be removed after upgrading uniben
    96             if not hasattr(app_folder, 'description_dict'):
    97                 nothing_to_do = False
    98                 setattr(app_folder,'description_dict',{})
    99                 logger.info(
    100                     '%s: description_dict added to root.' % self.log_prefix)
     96            #if not hasattr(app_folder, 'description_dict'):
     97            #    nothing_to_do = False
     98            #    setattr(app_folder,'description_dict',{})
     99            #    logger.info(
     100            #        '%s: description_dict added to root.' % self.log_prefix)
    101101            if nothing_to_do:
    102102                logger.info(
Note: See TracChangeset for help on using the changeset viewer.