Commit 79ecfc10 authored by Vlad Chursin's avatar Vlad Chursin

can't download with fileadmin from subdir under Windows

parent 16ed27c5
...@@ -830,7 +830,8 @@ class BaseFileAdmin(BaseView, ActionsMixin): ...@@ -830,7 +830,8 @@ class BaseFileAdmin(BaseView, ActionsMixin):
# Sort by type # Sort by type
items.sort(key=itemgetter(2), reverse=True) items.sort(key=itemgetter(2), reverse=True)
# Sort by modified date # Sort by modified date
# items.sort(key=lambda x: (x[0], x[1], x[2], x[3], datetime.fromtimestamp(x[4])), reverse=True) if not self._on_windows:
items.sort(key=lambda x: (x[0], x[1], x[2], x[3], datetime.fromtimestamp(x[4])), reverse=True)
else: else:
column_index = self.possible_columns.index(sort_column) column_index = self.possible_columns.index(sort_column)
items.sort(key=itemgetter(column_index), reverse=sort_desc) items.sort(key=itemgetter(column_index), reverse=sort_desc)
......
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