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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tristan Cavelier
erp5
Commits
87084ab5
Commit
87084ab5
authored
Aug 09, 2018
by
Tristan Cavelier
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_base: guessMimeType: set only if necessary
parent
fd5818e7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_guessMimeType.py
...on_interaction_workflow/scripts/Document_guessMimeType.py
+5
-2
No files found.
bt5/erp5_base/WorkflowTemplateItem/portal_workflow/document_conversion_interaction_workflow/scripts/Document_guessMimeType.py
View file @
87084ab5
...
@@ -4,5 +4,8 @@ portal = document.getPortalObject()
...
@@ -4,5 +4,8 @@ portal = document.getPortalObject()
filename
=
document
.
getFilename
()
filename
=
document
.
getFilename
()
content_type
=
portal
.
mimetypes_registry
.
lookupExtension
(
filename
)
content_type
=
portal
.
mimetypes_registry
.
lookupExtension
(
filename
)
if
content_type
is
not
None
:
if
content_type
is
None
:
document
.
setContentType
(
str
(
content_type
))
return
content_type
=
str
(
content_type
)
if
content_type
!=
document
.
getContentType
():
document
.
setContentType
(
content_type
)
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