Commit c6b850b1 authored by Diederik van der Boor's avatar Diederik van der Boor
Browse files

Fixed Django 2.0 compatibility in the new generate_filename()

parent 60265a1a
......@@ -85,9 +85,6 @@ class PrivateFileField(models.FileField):
# Support list, so joining can be done in a storage-specific manner.
path_parts.extend([self.storage.get_valid_name(dir) for dir in extra_dirs])
if not path_parts:
path_parts = [self.get_directory_name()]
path_parts.append(self._get_clean_filename(filename))
if django.VERSION >= (1, 10):
filename = posixpath.join(*path_parts)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment