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
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
Léo-Paul Géneau
erp5
Commits
906794ba
Commit
906794ba
authored
May 31, 2024
by
Georgios Dagkakis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
sqltest: decode strings (to the specified encoding ot 'utf-8') only in Python3
as it is done in other places of this file
parent
a5382e6f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5Type/patches/sqltest.py
product/ERP5Type/patches/sqltest.py
+4
-4
No files found.
product/ERP5Type/patches/sqltest.py
View file @
906794ba
...
...
@@ -174,13 +174,13 @@ else: # For easy diff with original (ZSQLMethods 3.14)
else
:
if
not
isinstance
(
v
,
StringTypes
):
v
=
str
(
v
)
if
isinstance
(
v
,
six
.
binary_type
):
v
=
v
.
decode
(
'utf
-8'
)
if
six
.
PY3
and
isinstance
(
v
,
six
.
binary_type
):
v
=
v
.
decode
(
self
.
encoding
or
'UTF
-8'
)
# The call to sql_quote__ can return something that is not
# a native string anymore!
v
=
md
.
getitem
(
'sql_quote__'
,
0
)(
v
)
if
isinstance
(
v
,
six
.
binary_type
):
v
=
v
.
decode
(
'utf
-8'
)
if
six
.
PY3
and
isinstance
(
v
,
six
.
binary_type
):
v
=
v
.
decode
(
self
.
encoding
or
'UTF
-8'
)
# if v.find("\'") >= 0: v="''".(v.split("\'"))
# v="'%s'" % v
vs
.
append
(
v
)
...
...
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