Skip to content

Commit 70fa269

Browse files
committed
Merge branch 'master' of github.com:jrief/django-admin-sortable2
2 parents 6b90fea + ae36c76 commit 70fa269

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

adminsortable2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = '0.7.2'
1+
__version__ = '0.7.3'

adminsortable2/admin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ def __init__(self, model, admin_site):
9898
self.exclude = [self.default_order_field]
9999
elif not self.exclude or self.default_order_field != self.exclude[0]:
100100
self.exclude = [self.default_order_field] + list(self.exclude)
101-
if not self.list_display_links:
101+
if isinstance(self.list_display_links, (list, tuple)) and len(self.list_display_links) == 0:
102102
self.list_display_links = [self.list_display[0]]
103103
self._add_reorder_method()
104104
self.list_display = list(self.list_display)

docs/source/changelog.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@
44
Release history
55
===============
66

7+
0.7.3
8+
-----
9+
* Fix #220: If model admin declares ``list_display_links = None``, no link is autogenerated for the detail view.
10+
711
0.7.2
812
-----
913
* Fully adopted and tested with Django-2.2

0 commit comments

Comments
 (0)