diff --git a/src/inventory/admin/item.py b/src/inventory/admin/item.py index 816dde4..ecc6168 100644 --- a/src/inventory/admin/item.py +++ b/src/inventory/admin/item.py @@ -155,5 +155,15 @@ class ItemModelAdmin(TagulousModelAdminFix, ImportExportMixin, SortableAdminMixi readonly_fields = ('id', 'create_dt', 'update_dt', 'user', 'related_items') inlines = (ItemImageModelInline, ItemFileModelInline, ItemLinkModelInline) + def get_list_display(self, request): + list_display = list(super().get_list_display(request)) + + # FIXME: SortableAdminMixin.get_list_display() adds this, we didn't need here: + # See: https://github.com/jrief/django-admin-sortable2/issues/363 + if '_reorder_' in list_display: + list_display.remove('_reorder_') + + return list_display + tagulous.admin.enhance(ItemModel, ItemModelAdmin) diff --git a/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html b/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html index 649422c..cc6ce66 100644 --- a/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html +++ b/src/inventory_project/tests/test_admin_item_auto_group_items_1.snapshot.html @@ -81,21 +81,6 @@
- -
- - - - -
-
- - Path str - -
-
-
-
@@ -105,9 +90,15 @@
- + +
+ + + + +
@@ -125,7 +116,7 @@ @@ -134,7 +125,7 @@ @@ -143,7 +134,7 @@ @@ -157,10 +148,6 @@ - -
-
- @@ -188,10 +175,6 @@ - -
-
- @@ -220,10 +203,6 @@ - -
-
- @@ -252,10 +231,6 @@ - -
-
- @@ -283,10 +258,6 @@ - -
-
- @@ -315,10 +286,6 @@ - -
-
-