Changeset 8143


Ignore:
Timestamp:
13 Apr 2012, 11:36:15 (13 years ago)
Author:
Henrik Bettermann
Message:

Do not override the objects dict values.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r8142 r8143  
    2323from time import time
    2424from datetime import datetime
     25from copy import deepcopy
    2526from zope.event import notify
    2627from zope.i18n import translate
     
    713714        lang = self.request.cookies.get('kofa.language')
    714715        for value in self.context.values():
    715             value_dict = value.__dict__
     716            # We have to make a deepcopy otherwise we'll override
     717            # the object's dict values (not the attributes).
     718            value_dict = deepcopy(value.__dict__)
    716719            value_dict['mandatory'] = translate(str(value.mandatory), 'zope',
    717720                target_language=lang)
Note: See TracChangeset for help on using the changeset viewer.