From e8a30537c8a76007fed1e9302a5c1b22cbde15c1 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 20 Jan 2024 19:54:36 +0800 Subject: [PATCH 1/2] hotfix to null course and section --- equipment_tracker/transactions/serializers.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/equipment_tracker/transactions/serializers.py b/equipment_tracker/transactions/serializers.py index c0e9f93..8f2eb1c 100644 --- a/equipment_tracker/transactions/serializers.py +++ b/equipment_tracker/transactions/serializers.py @@ -10,8 +10,6 @@ from django.core.cache import cache class CustomUserSerializer(serializers.ModelSerializer): name = serializers.CharField(source='__str__') - course = serializers.CharField() - section = serializers.CharField() class Meta: model = CustomUser From 142daa882827972ef7b8df4daa3b78ef33ccea54 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sat, 20 Jan 2024 19:55:24 +0800 Subject: [PATCH 2/2] add section to admin panel --- equipment_tracker/accounts/admin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equipment_tracker/accounts/admin.py b/equipment_tracker/accounts/admin.py index 844f17a..07b04de 100644 --- a/equipment_tracker/accounts/admin.py +++ b/equipment_tracker/accounts/admin.py @@ -9,7 +9,7 @@ class CustomUserAdmin(UserAdmin): list_display = UserAdmin.list_display + \ ('is_technician', 'is_teacher', 'id') fieldsets = UserAdmin.fieldsets + ( - (None, {'fields': ('is_technician', 'is_teacher', 'course')}), + (None, {'fields': ('is_technician', 'is_teacher', 'course', 'section')}), )