Skip to content

Commit

Permalink
#128 - fixed test
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] authored and hvelarde committed Sep 11, 2017
1 parent ea5bece commit 8b5b9c9
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion sc/social/like/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,11 @@ def validate_image_social(value):
logger.info(msg.format(type))
return msg.format(type)

if value.data.size > 5242880:
try:
size = value.size
except AttributeError:
size = value.data.size
if size > 5242880:
msg = u'Image size should be less than 5MB.'
logger.info(msg)
return msg
Expand Down

0 comments on commit 8b5b9c9

Please sign in to comment.