Skip to content

Commit 1908ab5

Browse files
Update filer/utils/filer_easy_thumbnails.py
Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com>
1 parent e939b46 commit 1908ab5

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

filer/utils/filer_easy_thumbnails.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,8 @@ def get_thumbnail_name(self, thumbnail_options, transparent=False):
3030
"""
3131
is_public = False
3232
if hasattr(self, "thumbnail_storage"):
33-
is_public = "PrivateFileSystemStorage" not in str(
34-
self.thumbnail_storage.__class__
35-
)
33+
from filer.storage import PrivateFileSystemStorage
34+
is_public = not isinstance(self.thumbnail_storage, PrivateFileSystemStorage)
3635

3736
path, source_filename = os.path.split(self.name)
3837
thumbnail_name = super(ThumbnailerNameMixin, self).get_thumbnail_name(

0 commit comments

Comments
 (0)