fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b66324
)
skip logging ZeroDivisionError on negative text areas
author
Jan Szejko
<janek37@gmail.com>
Fri, 21 Jul 2017 10:29:03 +0000
(12:29 +0200)
committer
Jan Szejko
<janek37@gmail.com>
Fri, 21 Jul 2017 10:29:03 +0000
(12:29 +0200)
src/picture/templatetags/picture_tags.py
patch
|
blob
|
history
diff --git
a/src/picture/templatetags/picture_tags.py
b/src/picture/templatetags/picture_tags.py
index
b31405b
..
a766b44
100644
(file)
--- a/
src/picture/templatetags/picture_tags.py
+++ b/
src/picture/templatetags/picture_tags.py
@@
-55,6
+55,8
@@
def area_thumbnail_url(area, geometry):
area.picture.image_file,
geometry,
crop="%dpx %dpx %dpx %dpx" % tuple(map(lambda d: max(0, d), tuple(coords[0] + coords[1]))))
+ except ZeroDivisionError:
+ return ''
except Exception, e:
logging.exception("Error creating a thumbnail for PictureArea")
return ''