Fix regression in thumb filter (#4006)

This commit is contained in:
Mira
2024-03-21 14:32:01 +01:00
committed by GitHub
parent 3651c88289
commit e4e0bd7ca0

View File

@@ -45,4 +45,4 @@ def thumb(source, arg):
# HACK: source.url works for some types of files (e.g. FieldFile), and for all files retrieved from Hierarkey,
# default_storage.url works for all files in NanoCDNStorage. For others, this may return an invalid URL.
# But for a fallback, this can probably be accepted.
return source.url if hasattr(source, 'url') else default_storage.url(source.name)
return source.url if hasattr(source, 'url') else default_storage.url(str(source))