Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
a5c87f16
Commit
a5c87f16
authored
Jan 24, 2013
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Image: prevent useless object modification when self.data has 0 length
parent
99de00d9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
product/ERP5/Document/Image.py
product/ERP5/Document/Image.py
+3
-3
No files found.
product/ERP5/Document/Image.py
View file @
a5c87f16
...
...
@@ -150,9 +150,9 @@ class Image(TextConvertableMixin, File, OFSImage):
self
.
data
=
self
.
_data
# Make sure size is defined
if
(
not
hasattr
(
aq_base
(
self
),
'size'
)
or
not
self
.
size
)
and
\
hasattr
(
aq_base
(
self
),
'data'
)
:
self
.
size
=
len
(
self
.
data
)
size
=
len
(
self
.
data
)
if
getattr
(
aq_base
(
self
),
'size'
,
None
)
!=
size
:
self
.
size
=
size
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getWidth'
)
def
getWidth
(
self
):
...
...
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