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
Mikolaï Krol
erp5
Commits
46abf781
Commit
46abf781
authored
Aug 10, 2011
by
Julien Muchembled
Browse files
Options
Browse Files
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):
...
@@ -197,12 +197,12 @@ class ContributionTool(BaseTool):
portal_type
=
kw
.
pop
(
'portal_type'
,
None
)
portal_type
=
kw
.
pop
(
'portal_type'
,
None
)
if
not
portal_type
:
if
not
portal_type
:
if
container
is
None
or
container
.
isModuleType
():
# Guess it with help of portal_contribution_registry
# Guess it with help of portal_contribution_registry
portal_type
=
portal
.
portal_contribution_registry
.
findPortalTypeName
(
portal_type
=
portal
.
portal_contribution_registry
.
findPortalTypeName
(
filename
=
filename
,
content_type
=
content_type
)
filename
=
filename
,
content_type
=
content_type
)
if
not
(
container
is
None
or
container
.
isModuleType
()
or
else
:
container
.
getTypeInfo
().
allowType
(
portal_type
))
:
portal_type
=
'Embedded File'
portal_type
=
'Embedded File'
if
container
is
not
None
:
if
container
is
not
None
:
# Simplify things here and return a document immediately
# Simplify things here and return a document immediately
...
...
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