From 4db7565830a0cfb95893e2f4ddc2f58bc3c69cc8 Mon Sep 17 00:00:00 2001 From: Fergal Moran Date: Tue, 20 Nov 2012 20:19:44 +0000 Subject: [PATCH] Fixed non-custom thumbnails --- spa/models/UserProfile.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/spa/models/UserProfile.py b/spa/models/UserProfile.py index c862a25..713cc8c 100644 --- a/spa/models/UserProfile.py +++ b/spa/models/UserProfile.py @@ -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: