Fixed non-custom thumbnails

This commit is contained in:
Fergal Moran
2012-11-20 20:19:44 +00:00
parent 58d8b728e2
commit 4db7565830

View File

@@ -94,8 +94,9 @@ class UserProfile(_BaseModel):
def get_small_profile_image(self):
try:
image = self.get_avatar_image()
ret = "%s%s" % (settings.MEDIA_URL, get_thumbnail(image, "32x32", crop='center').name)
return ret
if self.avatar_type == 'custom':
image = "%s%s" % (settings.MEDIA_URL, get_thumbnail(image, "32x32", crop='center').name)
return image
except SuspiciousOperation, ex:
self.logger.warn("Error getting small profile image: %s", ex.message)
except IOError, ex: