[z3-checkins] r7076 - z3/sqlos/trunk/event

dreamcatcher at codespeak.net dreamcatcher at codespeak.net
Wed Oct 20 18:48:49 MEST 2004


Author: dreamcatcher
Date: Wed Oct 20 18:48:49 2004
New Revision: 7076

Modified:
   z3/sqlos/trunk/event/subscriber.py
Log:
Needs to remove security proxies here. Thanks to Josh for noticing. We need *tests* :(

Modified: z3/sqlos/trunk/event/subscriber.py
==============================================================================
--- z3/sqlos/trunk/event/subscriber.py	(original)
+++ z3/sqlos/trunk/event/subscriber.py	Wed Oct 20 18:48:49 2004
@@ -12,6 +12,7 @@
 
 from sqlos.interfaces import ISQLObject
 from sqlos.event.interfaces import expired
+from zope.security.proxy import removeSecurityProxy
 from sqlobject import SQLObjectNotFound
 
 def sqlobjectModifiedSubscriber(event):
@@ -46,8 +47,9 @@
         # doesn't clear _SO_createValues. So we do more or less the
         # same as sync() does by calling _init() and setting _expired
         # to False.
-        obj._init(obj_id)
-        obj._expired = False
+        unproxied = removeSecurityProxy(obj)
+        unproxied._init(obj_id)
+        unproxied._expired = False
     except SQLObjectNotFound:
         # Object may have been deleted or un-created
         pass


More information about the z3-checkins mailing list