Skip to content
This repository has been archived by the owner on Feb 13, 2019. It is now read-only.

Commit

Permalink
Changed the order of this logic so it doesn't die when image is None
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Wentz committed Jun 10, 2014
1 parent 582bbfc commit e6c53ed
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion djbetty/templatetags/betty.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ def cropped_url(image, ratio="original", width=600, format="jpg"):
@register.simple_tag(takes_context=True)
def cropped(context, image, ratio="original", width=600, format="jpg"):
image = coerce_image(image)
if image.id is None or image is None:
if image is None or image.id is None:
if settings.BETTY_DEFAULT_IMAGE:
image = AnonymousImageField(settings.BETTY_DEFAULT_IMAGE)
else:
Expand Down

0 comments on commit e6c53ed

Please sign in to comment.