Reset content pointer

This commit is contained in:
Matthew Tretter 2013-05-10 03:08:43 -04:00
parent 906fbbd463
commit 6db082bca2

View file

@ -74,6 +74,9 @@ class ImageCacheFile(BaseIKFile, ImageFile):
actual_name = self.storage.save(self.name, content)
# We're going to reuse the generated file, so we need to reset the pointer.
content.seek(0)
# Store the generated file. If we don't do this, the next time the
# "file" attribute is accessed, it will result in a call to the storage
# backend (in ``BaseIKFile._get_file``). Since we already have the