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
c9eea8a6
Commit
c9eea8a6
authored
Apr 02, 2024
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixup! web_renderjs_ui: py3
parent
41f523f2
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
6 deletions
+5
-6
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
...erjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
+5
-6
No files found.
bt5/erp5_web_renderjs_ui_test/SkinTemplateItem/portal_skins/erp5_web_renderjs_ui_test/MailHost_redirectPageToURLFromLastMessage.py
View file @
c9eea8a6
last_message
=
context
.
getLastLog
()[
-
1
]
import
re
line_list
=
filter
(
None
,
last_message
.
replace
(
"=
\
n
"
,
""
).
split
(
"
\
n
"
))
from
Products.ERP5Type.Utils
import
bytes2str
for
line
in
line_list
:
last_message_text
=
bytes2str
(
context
.
getMessageList
()[
-
1
][
2
])
if
"http"
in
line
:
__traceback_info__
=
last_message_text
return
context
.
REQUEST
.
RESPONSE
.
redirect
(
line
.
replace
(
"=3D"
,
"="
))
raise
RuntimeError
(
"URL not found in the email"
)
container
.
REQUEST
.
RESPONSE
.
redirect
(
re
.
findall
(
r"http:.*"
,
bytes2str
(
last_message_text
))[
0
]
)
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