Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Romain Courteaud
erp5
Commits
4c201935
Commit
4c201935
authored
Apr 12, 2024
by
Romain Courteaud
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
romain_dev: update getObjectByOid
parent
841e32c8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
35 deletions
+24
-35
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.py
...TemplateItem/portal_components/extension.erp5.test_kaz.py
+21
-11
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.xml
...emplateItem/portal_components/extension.erp5.test_kaz.xml
+3
-24
No files found.
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.py
View file @
4c201935
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
ob
=
self
.
_p_jar
[
oid
]
#return ob
result
=
[
ob
.
__class__
,]
n
=
1
for
k
,
v
in
ob
.
iteritems
():
result
.
append
((
k
,
k
.
__class__
,
v
,
v
.
__class__
))
n
+=
1
if
n
>
100
:
break
return
result
\ No newline at end of file
oid
=
0x174c174d
oid
=
0x154aaf61
oid
=
0x174c283a
oid
=
0x174ac365
oid
=
0x11599980
oid
=
0x0f29c33d
oid
=
0x17501c78
oid
=
0x17509394
oid
=
0x050ae6c4
oid
=
0x589a
oid
=
0x1770c10c
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
bt5/romain_dev/ExtensionTemplateItem/portal_components/extension.erp5.test_kaz.xml
View file @
4c201935
...
...
@@ -6,12 +6,6 @@
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
_recorded_property_dict
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
default_reference
</string>
</key>
<value>
<string>
test_kaz
</string>
</value>
...
...
@@ -55,28 +49,13 @@
<item>
<key>
<string>
workflow_history
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
I
=
</string>
</persistent>
</value>
</item>
</dictionary>
</pickle>
</record>
<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>
<global
name=
"PersistentMapping"
module=
"Persistence.mapping"
/>
</pickle>
...
...
@@ -89,7 +68,7 @@
<item>
<key>
<string>
component_validation_workflow
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
Q
=
</string>
</persistent>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAA
M
=
</string>
</persistent>
</value>
</item>
</dictionary>
...
...
@@ -98,7 +77,7 @@
</dictionary>
</pickle>
</record>
<record
id=
"
4"
aka=
"AAAAAAAAAAQ
="
>
<record
id=
"
3"
aka=
"AAAAAAAAAAM
="
>
<pickle>
<global
name=
"WorkflowHistoryList"
module=
"Products.ERP5Type.Workflow"
/>
</pickle>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment