Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Hamza
erp5-Boxiang
Commits
63031499
Commit
63031499
authored
Jun 08, 2016
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sql_browser: nowadays Decimal module is allowed in restricted environment
since
be31425e
parent
d2cb31b1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
bt5/erp5_sql_browser/SkinTemplateItem/portal_skins/erp5_sql_browser/ZMySQLDAConnection_getQueryResultAsJSON.py
...p5_sql_browser/ZMySQLDAConnection_getQueryResultAsJSON.py
+2
-2
No files found.
bt5/erp5_sql_browser/SkinTemplateItem/portal_skins/erp5_sql_browser/ZMySQLDAConnection_getQueryResultAsJSON.py
View file @
63031499
#
from decimal import Decimal
from
decimal
import
Decimal
import
datetime
import
datetime
import
json
import
json
from
DateTime
import
DateTime
from
DateTime
import
DateTime
...
@@ -26,7 +26,7 @@ for line in data[1:]:
...
@@ -26,7 +26,7 @@ for line in data[1:]:
v
=
v
.
ISO
()
v
=
v
.
ISO
()
elif
isinstance
(
v
,
datetime
.
datetime
):
elif
isinstance
(
v
,
datetime
.
datetime
):
v
=
v
.
isoformat
()
v
=
v
.
isoformat
()
elif
"Decimal"
in
repr
(
v
):
# XXX decimal is not allowed in restricted environment
elif
isinstance
(
v
,
Decimal
):
v
=
float
(
v
)
v
=
float
(
v
)
new_line
.
append
(
v
)
new_line
.
append
(
v
)
new_data
.
append
(
new_line
)
new_data
.
append
(
new_line
)
...
...
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