[Checkins] SVN: Products.GenericSetup/branches/1.7/Products/GenericSetup/context.py Fix snapshots by allowing duplicates
Patrick Gerken
do3ccqrv at gmail.com
Mon Nov 21 11:49:50 UTC 2011
Log message for revision 123453:
Fix snapshots by allowing duplicates
Changed:
U Products.GenericSetup/branches/1.7/Products/GenericSetup/context.py
-=-
Modified: Products.GenericSetup/branches/1.7/Products/GenericSetup/context.py
===================================================================
--- Products.GenericSetup/branches/1.7/Products/GenericSetup/context.py 2011-11-21 09:18:10 UTC (rev 123452)
+++ Products.GenericSetup/branches/1.7/Products/GenericSetup/context.py 2011-11-21 11:49:49 UTC (rev 123453)
@@ -592,9 +592,15 @@
for element in path:
if element not in current.objectIds():
- # No Unicode IDs!
- current._setObject( str( element ), Folder( element ) )
+ orig_check = current._checkId
+ current._checkId = lambda x: orig_check(x, allow_dup=True)
+ try:
+ # No Unicode IDs!
+ current._setObject( str( element ), Folder( element ) )
+ finally:
+ del current._checkId
+
current = current._getOb( element )
return current
More information about the checkins
mailing list