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
Aaron Chen
erp5
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
Hide 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):
...
@@ -150,9 +150,9 @@ class Image(TextConvertableMixin, File, OFSImage):
self
.
data
=
self
.
_data
self
.
data
=
self
.
_data
# Make sure size is defined
# Make sure size is defined
if
(
not
hasattr
(
aq_base
(
self
),
'size'
)
or
not
self
.
size
)
and
\
size
=
len
(
self
.
data
)
hasattr
(
aq_base
(
self
),
'data'
)
:
if
getattr
(
aq_base
(
self
),
'size'
,
None
)
!=
size
:
self
.
size
=
len
(
self
.
data
)
self
.
size
=
size
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getWidth'
)
security
.
declareProtected
(
Permissions
.
AccessContentsInformation
,
'getWidth'
)
def
getWidth
(
self
):
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