Skip to content

Commit

Permalink
Fixed bad caching of transparent thumbnails when using a remote stora…
Browse files Browse the repository at this point in the history
…ge backend.
  • Loading branch information
winhamwr committed Sep 16, 2010
1 parent 895c20c commit d1e74f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion easy_thumbnails/files.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ def get_thumbnail(self, thumbnail_options, save=True):
save_thumbnail(thumbnail, self.thumbnail_storage)
# Ensure the right thumbnail name is used based on the transparency
# of the image.
filename = (self.is_transparent(thumbnail) and transparent_name or
filename = (self.is_transparent(thumbnail.image) and transparent_name or
opaque_name)
self.get_thumbnail_cache(filename, create=True, update=True)

Expand Down
2 changes: 1 addition & 1 deletion easy_thumbnails/tests/templatetags.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ def testBasicCached(self):
if utils.is_storage_local(self.storage):
self.assertEqual(output, 'src="%s"' % expected_url)
else:
self.assertTrue(output.find(expected) != -1)
self.assertTrue(output.find(expected) != -1, "Actual output:%s" % output)

# Ensure that we didn't add another thumbnail to the cache
self.assertEqual(Thumbnail.objects.all().count(), 1)
Expand Down

0 comments on commit d1e74f2

Please sign in to comment.