Skip to content

Commit

Permalink
Merge pull request matthewwithanm#477 from vstoykov/fix/django-master
Browse files Browse the repository at this point in the history
Do not check for existence if name is None
  • Loading branch information
vstoykov authored Oct 12, 2018
2 parents 94cc8ed + 2c85d5a commit 3317273
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imagekit/cachefiles/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def generate(self, file, force=False):

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):
Expand Down

0 comments on commit 3317273

Please sign in to comment.