Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OpenERP Connect
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
XCG
OpenERP Connect
Commits
ceac8e53
Commit
ceac8e53
authored
11 years ago
by
Florent Aide
Browse files
Options
Downloads
Patches
Plain Diff
fix an exception is no value is present in json payload
parent
c9d94890
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
oec/core.py
+1
-0
1 addition, 0 deletions
oec/core.py
oec/reader.py
+7
-0
7 additions, 0 deletions
oec/reader.py
with
8 additions
and
0 deletions
oec/core.py
+
1
−
0
View file @
ceac8e53
...
...
@@ -61,6 +61,7 @@
result
=
sender
.
send
()
resultparser
=
ResultParser
(
result
)
index
=
0
for
index
,
item
in
enumerate
(
resultparser
.
parse_result
()):
success
,
info
=
item
if
not
success
:
...
...
This diff is collapsed.
Click to expand it.
oec/reader.py
+
7
−
0
View file @
ceac8e53
import
ijson
from
decimal
import
Decimal
class
Reader
(
object
):
...
...
@@ -8,4 +9,10 @@
def
read
(
self
):
for
dic
in
self
.
objects
:
for
k
,
v
in
dic
.
iteritems
():
# scan the result to cast all decimals into float...
# because XMLRPC-LIB cannot send Decimal
if
isinstance
(
v
,
Decimal
):
dic
[
k
]
=
float
(
v
)
yield
dic
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment