From 8a383925344c5f247f863d9a4273b43ddeb1cdbd Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 3 Dec 2023 12:38:37 +0800 Subject: [PATCH] Fix admin panel fields causing crashes --- equipment_tracker/equipment_groups/admin.py | 6 ++---- equipment_tracker/equipments/admin.py | 8 ++++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/equipment_tracker/equipment_groups/admin.py b/equipment_tracker/equipment_groups/admin.py index 007a018..28ed500 100644 --- a/equipment_tracker/equipment_groups/admin.py +++ b/equipment_tracker/equipment_groups/admin.py @@ -5,7 +5,5 @@ from simple_history.admin import SimpleHistoryAdmin @admin.register(EquipmentGroup) class EquipmentGroupAdmin(SimpleHistoryAdmin): - readonly_fields = ['status', 'dated_added', - 'last_updated', 'last_updated_by'] - list_display = ('name', 'status', 'date_added', - 'last_updated', 'last_updated_by') + readonly_fields = ['status', 'date_added', 'last_updated'] + list_display = ('name', 'status', 'date_added', 'last_updated') diff --git a/equipment_tracker/equipments/admin.py b/equipment_tracker/equipments/admin.py index b91ad3d..561282d 100644 --- a/equipment_tracker/equipments/admin.py +++ b/equipment_tracker/equipments/admin.py @@ -5,12 +5,12 @@ from .models import Equipment, EquipmentInstance @admin.register(Equipment) class EquipmentAdmin(SimpleHistoryAdmin): - readonly_fields = ('date_added', 'last_updated', 'last_updated_by') - list_display = ('name', 'date_added', 'last_updated', 'last_updated_by') + readonly_fields = ('date_added', 'last_updated') + list_display = ('name', 'date_added', 'last_updated') @admin.register(EquipmentInstance) class EquipmentInstanceAdmin(SimpleHistoryAdmin): - readonly_fields = ('date_added', 'last_updated', 'last_updated_by') + readonly_fields = ('date_added', 'last_updated') list_display = ('equipment', 'status', 'remarks', - 'date_added', 'last_updated', 'last_updated_by') + 'date_added', 'last_updated')