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
Ekaterina
erp5
Commits
e54124d4
Commit
e54124d4
authored
Dec 17, 2019
by
Arnaud Fontaine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ZODB Components: Preparation of erp5_base migration from FS: Fix pylint redefined-builtin warnings.
parent
080dafd0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
15 deletions
+15
-15
product/ERP5/Document/Image.py
product/ERP5/Document/Image.py
+15
-15
No files found.
product/ERP5/Document/Image.py
View file @
e54124d4
...
...
@@ -189,9 +189,9 @@ class Image(TextConvertableMixin, File, OFSImage):
id_list
=
list
(
DEFAULT_DISPLAY_ID_LIST
)
# Exclude specified displays
if
exclude
:
for
id
in
exclude
:
if
id
in
id_list
:
id_list
.
remove
(
id
)
for
id
_
in
exclude
:
if
id
_
in
id_list
:
id_list
.
remove
(
id
_
)
# Sort by desired photo surface area
def
getSurfaceArea
(
img
):
x
,
y
=
self
.
getSizeFromImageDisplay
(
img
)
...
...
@@ -214,22 +214,22 @@ class Image(TextConvertableMixin, File, OFSImage):
displays
=
[]
if
quality
is
_MARKER
:
quality
=
self
.
getDefaultImageQuality
(
format
)
for
id
in
self
.
displayIds
(
exclude
):
if
self
.
_isGenerated
(
id
,
format
=
format
,
quality
=
quality
,
\
for
id
_
in
self
.
displayIds
(
exclude
):
if
self
.
_isGenerated
(
id
_
,
format
=
format
,
quality
=
quality
,
\
resolution
=
resolution
):
photo_width
=
self
.
_photos
[(
id
,
format
)].
width
photo_height
=
self
.
_photos
[(
id
,
format
)].
height
bytes
=
self
.
_photos
[(
id
,
format
)].
_size
()
age
=
self
.
_photos
[(
id
,
format
)].
_age
()
photo_width
=
self
.
_photos
[(
id
_
,
format
)].
width
photo_height
=
self
.
_photos
[(
id
_
,
format
)].
height
bytes
_
=
self
.
_photos
[(
id_
,
format
)].
_size
()
age
=
self
.
_photos
[(
id
_
,
format
)].
_age
()
else
:
(
photo_width
,
photo_height
,
bytes
,
age
)
=
(
None
,
None
,
None
,
None
)
image_size
=
self
.
getSizeFromImageDisplay
(
id
)
displays
.
append
({
'id'
:
id
,
(
photo_width
,
photo_height
,
bytes
_
,
age
)
=
(
None
,
None
,
None
,
None
)
image_size
=
self
.
getSizeFromImageDisplay
(
id
_
)
displays
.
append
({
'id'
:
id
_
,
'width'
:
image_size
[
0
],
'height'
:
image_size
[
1
],
'photo_width'
:
photo_width
,
'photo_height'
:
photo_height
,
'bytes'
:
bytes
,
'bytes'
:
bytes
_
,
'age'
:
age
})
return
displays
...
...
@@ -397,8 +397,8 @@ class Image(TextConvertableMixin, File, OFSImage):
quality
=
self
.
getDefaultImageQuality
(
format
)
width
,
height
=
image_size
base
,
ext
=
splitext
(
self
.
id
)
id
=
'%s_%s_%s.%s'
%
(
base
,
width
,
height
,
ext
,)
image
=
OFSImage
(
id
,
self
.
getTitle
(),
id
_
=
'%s_%s_%s.%s'
%
(
base
,
width
,
height
,
ext
,)
image
=
OFSImage
(
id
_
,
self
.
getTitle
(),
self
.
_getDisplayData
(
format
,
quality
,
resolution
,
frame
,
image_size
,
crop
))
...
...
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