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
138
Merge Requests
138
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
Jobs
Commits
Open sidebar
nexedi
erp5
Commits
bade10f8
Commit
bade10f8
authored
Dec 28, 2020
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
File: convert str fo file_object if needed
parent
14f54456
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
0 deletions
+3
-0
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py
...umentTemplateItem/portal_components/document.erp5.File.py
+3
-0
No files found.
product/ERP5/bootstrap/erp5_core/DocumentTemplateItem/portal_components/document.erp5.File.py
View file @
bade10f8
...
...
@@ -36,6 +36,7 @@ from erp5.component.document.Document import ConversionError
from
Products.ERP5Type.Base
import
Base
,
removeIContentishInterface
from
OFS.Image
import
File
as
OFS_File
from
Products.ERP5Type.Utils
import
deprecated
from
cStringIO
import
StringIO
def
_unpackData
(
data
):
"""
...
...
@@ -111,6 +112,8 @@ class File(Document, OFS_File):
if
filename
:
self
.
_setFilename
(
filename
)
if
file_object
is
not
None
:
if
isinstance
(
file_object
,
str
):
file_object
=
StringIO
(
file_object
)
# XXX: Rather than doing nothing if empty, consider changing:
# - _update_image_info to clear metadata
# - interactions to do nothing (or else?)
...
...
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