Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

cherry-pick [bug 737478] missing default Image

  • Loading branch information...
commit 1f91de2fc40577b4902c52fd9158fed8212377cc 1 parent c6076fd
@readevalprint readevalprint authored
Showing with 5 additions and 7 deletions.
  1. +5 −7 apps/common/helpers.py
View
12 apps/common/helpers.py
@@ -1,4 +1,5 @@
import logging
+import os
from django.conf import settings
@@ -14,12 +15,9 @@ def thumbnail(source, *args, **kwargs):
# Templates should never return an exception
try:
- if not source:
+ if not source.path:
source = kwargs.get('default')
- if not source:
- source = getattr(settings, 'DEFAULT_IMAGE_SRC')
return get_thumbnail(source, *args, **kwargs)
- except Exception as e:
- logger.error('Thumbnail had Exception: %s' % (e,))
- return None
-
+ except:
+ source = getattr(settings, 'DEFAULT_IMAGE_SRC')
+ return get_thumbnail(source, *args, **kwargs)
Please sign in to comment.
Something went wrong with that request. Please try again.