Skip to content
Browse files

cherry-pick [bug 737478] missing default Image

  • Loading branch information...
1 parent c6076fd commit 1f91de2fc40577b4902c52fd9158fed8212377cc @readevalprint readevalprint committed
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)

0 comments on commit 1f91de2

Please sign in to comment.
Something went wrong with that request. Please try again.