Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Joshua
erp5
Commits
46abf781
Commit
46abf781
authored
13 years ago
by
Julien Muchembled
Browse files
Options
Download
Email Patches
Plain Diff
Contribution Tool: fallback to Embedded File only if necessary
parent
af695afa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
product/ERP5/Tool/ContributionTool.py
product/ERP5/Tool/ContributionTool.py
+6
-6
No files found.
product/ERP5/Tool/ContributionTool.py
View file @
46abf781
...
...
@@ -197,12 +197,12 @@ class ContributionTool(BaseTool):
portal_type
=
kw
.
pop
(
'portal_type'
,
None
)
if
not
portal_type
:
if
container
is
None
or
container
.
isModuleType
():
# Guess it with help of
portal_contribution_registry
portal_type
=
portal
.
portal_contribution_registry
.
findPortalTypeName
(
filename
=
filename
,
content_type
=
content_type
)
else
:
portal_type
=
'Embedded File'
# Guess it with help of portal_contribution_registry
portal_type
=
portal
.
portal_contribution_registry
.
findPortalTypeName
(
filename
=
filename
,
content_type
=
content_type
)
if
not
(
container
is
None
or
container
.
isModuleType
()
or
container
.
getTypeInfo
().
allowType
(
portal_type
))
:
portal_type
=
'Embedded File'
if
container
is
not
None
:
# Simplify things here and return a document immediately
...
...
This diff is collapsed.
Click to expand it.
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