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
Labels
Merge Requests
7
Merge Requests
7
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Jérome Perrin
erp5
Commits
f39538f0
Commit
f39538f0
authored
Jun 25, 2024
by
Romain Courteaud
Committed by
Kazuhiko Shiozaki
Jul 11, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5/tests/testXHTML: do not crash on broken proxy field
parent
05e28e5b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletion
+5
-1
product/ERP5/tests/testXHTML.py
product/ERP5/tests/testXHTML.py
+5
-1
No files found.
product/ERP5/tests/testXHTML.py
View file @
f39538f0
...
...
@@ -41,6 +41,7 @@ from AccessControl import getSecurityManager
from
Testing
import
ZopeTestCase
from
Products.ERP5Type.tests.ERP5TypeTestCase
import
ERP5TypeTestCase
from
Products.ERP5Type.tests.utils
import
addUserToDeveloperRole
,
findContentChain
from
Products.ERP5Form.ProxyField
import
BrokenProxyField
from
Products.CMFCore.utils
import
getToolByName
# You can invoke same tests in your favourite collection of business templates
# by using TestXHTMLMixin like the following :
...
...
@@ -106,7 +107,10 @@ class TestXHTMLMixin(ERP5TypeTestCase):
for
field_path
,
field
in
skins_tool
[
skin_folder_id
].
ZopeFind
(
skins_tool
[
skin_folder_id
],
obj_metatypes
=
[
'ProxyField'
],
search_sub
=
1
):
template_field
=
field
.
getTemplateField
(
cache
=
False
)
try
:
template_field
=
field
.
getTemplateField
(
cache
=
False
)
except
BrokenProxyField
:
template_field
=
None
if
template_field
is
None
:
# Base_viewRelatedObjectList (used for proxy listbox ids on
# relation fields) is an exception, the proxy field has no target
...
...
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