Changeset 48073

Show
Ignore:
Timestamp:
08/07/06 17:17:17 (2 years ago)
Author:
gracinet
Message:

optional bypass of getEditableContent in datamodel commit (#1608 & #1714)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • CPS3/products/CPSSchemas/trunk/CHANGES

    r47840 r48073  
    1010New internal features: 
    1111~~~~~~~~~~~~~~~~~~~~~~ 
    12 - 
     12- optional bypass of getEditableContent in datamodel commit (#1608 & #1714) 
  • CPS3/products/CPSSchemas/trunk/DataModel.py

    r31171 r48073  
    313313            adapter.setContextObject(ob, proxy) 
    314314 
    315     def _commit(self, check_perms=1): 
     315    def _commit(self, check_perms=1, _set_editable=True): 
    316316        """Commit modified data into object. 
    317317 
     
    319319 
    320320        Try to re-get an editable version of the object before modifying 
    321         it. This is needed by CPS for frozen objects. 
    322         """ 
    323         self._setEditable() 
     321        it. This is needed by CPS for frozen objects and can be bypassed 
     322        with the _set_editable kwarg. This bypass should be used at creation 
     323        time only: the proxy doesn't know the new object yet in this case. 
     324        """ 
     325        if _set_editable: 
     326            self._setEditable() 
    324327        ob = self._ob 
    325328