Skip to content
Snippets Groups Projects
Commit 0e8cbae0 authored by Michael Fladischer's avatar Michael Fladischer
Browse files

Add patch to not check for cache file existence if name is None (Closes: #950070).

parent 59e59a8a
No related branches found
No related tags found
No related merge requests found
......@@ -6,6 +6,8 @@ python-django-imagekit (4.0.2-3) UNRELEASED; urgency=medium
[ Michael Fladischer ]
* Refresh patches.
* Add patch to not check for cache file existence if name is None
(Closes: #950070).
-- Ondřej Nový <onovy@debian.org> Mon, 27 Aug 2018 15:07:55 +0200
......
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Sun, 23 Feb 2020 16:18:07 +0100
Subject: Do not check for existence if name is None (Closes: #950070).
---
imagekit/cachefiles/backends.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/imagekit/cachefiles/backends.py b/imagekit/cachefiles/backends.py
index e006dc8..2ab4024 100644
--- a/imagekit/cachefiles/backends.py
+++ b/imagekit/cachefiles/backends.py
@@ -110,7 +110,7 @@ class Simple(CachedFileBackend):
def _exists(self, file):
return bool(getattr(file, '_file', None)
- or file.storage.exists(file.name))
+ or (file.name and file.storage.exists(file.name)))
def _generate_file(backend, file, force=False):
0001-Replace-execfile-call-with-Python3-compatible-versio.patch
0002-Disable-usage-of-nose-progressive-as-it-has-not-been.patch
0003-Disable-build-status-image-to-prevent-privacy-breach.patch
0004-Do-not-check-for-existence-if-name-is-None-Closes-95.patch
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment