Phillip J. Eby wrote:

> Steve Alexander wrote:
> 
>>  As a simpler workaround, you can use 
>>your_object.commitSubtransaction() instead of redirecting to a new page. 
>>
> Um, this shouldn't be the issue here.  _SetAttributeFor() should be called
> when the attribute is set; it's not transaction-driven.  Something weird is
> happening with Christian's situation that I haven't investigated yet.


I agree. However, if Christian's problem can be worked-around by 
redirecting before setting attributes, then it should also be 
workaroundable by calling commitSubtransaction.


> Actually, the status should be AddedStatus, and it should stay that way
> throughout the transaction, unless the object gets deleted in the same
> transaction.


That's what I'd originally thought. Then I (mis-?)read the code again...

The __set_attr__ method of DataSkins.py says:

    self._objectChanging(name)

The _objectChanging method says:

     if self._v_status_ is not ChangedStatus:
         d[_v_dm_]._objectChanging(self)
         d[_v_status_] = ChangedStatus

I don't see an exception for if _v_status is already AddedStatus.

--
Steve Alexander
Software Engineer
Cat-Box limited



_______________________________________________
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope )

Reply via email to