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
Carlos Ramos Carreño
erp5
Commits
373e83d2
Commit
373e83d2
authored
Apr 16, 2024
by
Carlos Ramos Carreño
Committed by
Jérome Perrin
May 09, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix tests for erp5_officejs in Python 2.
parent
f5c51c4c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/StaticWebSite_getRedirectSourceUrlForOfficeJSApplication.py
...aticWebSite_getRedirectSourceUrlForOfficeJSApplication.py
+5
-2
No files found.
bt5/erp5_officejs/SkinTemplateItem/portal_skins/erp5_officejs_common/StaticWebSite_getRedirectSourceUrlForOfficeJSApplication.py
View file @
373e83d2
...
@@ -8,6 +8,8 @@ Redirect to domain specified as layout property on website
...
@@ -8,6 +8,8 @@ Redirect to domain specified as layout property on website
import
binascii
import
binascii
import
base64
import
base64
from
Products.ERP5Type.Utils
import
bytes2str
,
str2bytes
import
six
result_dict
=
{
"error"
:
"url missing definition view path"
}
result_dict
=
{
"error"
:
"url missing definition view path"
}
base_64
=
False
base_64
=
False
...
@@ -19,8 +21,9 @@ except KeyError:
...
@@ -19,8 +21,9 @@ except KeyError:
return
result_dict
return
result_dict
try
:
try
:
encoded
=
name
.
replace
(
"definition_view/"
,
""
,
1
).
encode
()
encoded
=
str2bytes
(
name
.
replace
(
"definition_view/"
,
""
,
1
))
name
=
base64
.
decodebytes
(
encoded
).
decode
()
decode_method
=
base64
.
decodebytes
if
six
.
PY3
else
base64
.
decodestring
name
=
bytes2str
(
decode_method
(
encoded
))
base_64
=
True
base_64
=
True
except
binascii
.
Error
:
except
binascii
.
Error
:
pass
pass
...
...
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