Commit a4cc5d09 authored by Romain Courteaud's avatar Romain Courteaud

romain_dev: update getObjectByOid

parent 9b7b9a78
def getObjectByOid(self):#XXXYYY
# ConflictError: database conflict error (oid 0x174c174d, class BTrees.OIBTree.OIBucket, serial this txn started with 0x03f7c3f85883f5bb 2024-04-08 14:48:20.745813, serial currently committed 0x03f7c3f95ce66c66 2024-04-08 14:49:21.773459)
def getObjectByOid(self, oid):#XXXYYY oid = 0x174c174d
ob = self._p_jar[oid] oid = 0x154aaf61
#return ob oid = 0x174c283a
result = [ob.__class__,] oid = 0x174ac365
n = 1 oid = 0x11599980
for k,v in ob.iteritems(): oid = 0x0f29c33d
result.append((k, k.__class__,v, v.__class__)) oid = 0x17501c78
n += 1 oid = 0x17509394
if n > 100: oid = 0x050ae6c4
break oid = 0x589a
return result oid = 0x1770c10c
\ No newline at end of file oid = 0x1775c212
from ZODB.utils import p64
oid = p64(int(str(oid), 0))
ob = self._p_jar.get(oid)
# ob = self._p_jar[oid]
if 1:
return ob
...@@ -6,12 +6,6 @@ ...@@ -6,12 +6,6 @@
</pickle> </pickle>
<pickle> <pickle>
<dictionary> <dictionary>
<item>
<key> <string>_recorded_property_dict</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item> <item>
<key> <string>default_reference</string> </key> <key> <string>default_reference</string> </key>
<value> <string>test_kaz</string> </value> <value> <string>test_kaz</string> </value>
...@@ -55,28 +49,13 @@ ...@@ -55,28 +49,13 @@
<item> <item>
<key> <string>workflow_history</string> </key> <key> <string>workflow_history</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle>
<global name="PersistentMapping" module="Persistence.mapping"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>data</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="PersistentMapping" module="Persistence.mapping"/> <global name="PersistentMapping" module="Persistence.mapping"/>
</pickle> </pickle>
...@@ -89,7 +68,7 @@ ...@@ -89,7 +68,7 @@
<item> <item>
<key> <string>component_validation_workflow</string> </key> <key> <string>component_validation_workflow</string> </key>
<value> <value>
<persistent> <string encoding="base64">AAAAAAAAAAQ=</string> </persistent> <persistent> <string encoding="base64">AAAAAAAAAAM=</string> </persistent>
</value> </value>
</item> </item>
</dictionary> </dictionary>
...@@ -98,7 +77,7 @@ ...@@ -98,7 +77,7 @@
</dictionary> </dictionary>
</pickle> </pickle>
</record> </record>
<record id="4" aka="AAAAAAAAAAQ="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/> <global name="WorkflowHistoryList" module="Products.ERP5Type.Workflow"/>
</pickle> </pickle>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment