server/posts: always use null size for bad images

This commit is contained in:
rr- 2016-07-30 12:37:39 +02:00
parent 298aedbc75
commit ef76cdaf8a
1 changed files with 3 additions and 0 deletions

View File

@ -219,6 +219,9 @@ def update_post_content(post, content):
except errors.ProcessingError: except errors.ProcessingError:
post.canvas_width = None post.canvas_width = None
post.canvas_height = None post.canvas_height = None
if post.canvas_width <= 0 or post.canvas_height <= 0:
post.canvas_width = None
post.canvas_height = None
files.save(get_post_content_path(post), content) files.save(get_post_content_path(post), content)
update_post_thumbnail(post, content=None, delete=False) update_post_thumbnail(post, content=None, delete=False)