We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cf0d4c2 commit add60d0Copy full SHA for add60d0
adminsortable2/admin.py
@@ -2,7 +2,6 @@
2
from pathlib import Path
3
from itertools import chain
4
from types import MethodType
5
-from typing import Optional
6
7
from django import VERSION as DJANGO_VERSION
8
from django.conf import settings
@@ -29,7 +28,7 @@
29
28
__all__ = ['SortableAdminMixin', 'SortableInlineAdminMixin']
30
31
32
-def _parse_ordering_part(part: OrderBy | BaseExpression | F | str) -> tuple[str, Optional[str]]:
+def _parse_ordering_part(part):
33
if isinstance(part, str):
34
return ('-', part[1:]) if part.startswith('-') else ('', part)
35
elif isinstance(part, OrderBy) and isinstance(part.expression, F):
0 commit comments