From 079b88fe7f4cc0cd3963eeb9f05dd88773717ec9 Mon Sep 17 00:00:00 2001 From: Keannu Bernasol Date: Sun, 19 Nov 2023 19:06:03 +0800 Subject: [PATCH] Pre-generate accounts as technicians by default --- equipment_tracker/accounts/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/equipment_tracker/accounts/models.py b/equipment_tracker/accounts/models.py index d2017fe..12816f8 100644 --- a/equipment_tracker/accounts/models.py +++ b/equipment_tracker/accounts/models.py @@ -59,7 +59,7 @@ def create_superuser(sender, **kwargs): if not User.objects.filter(username=username).exists(): # Create the superuser with is_active set to False superuser = User.objects.create_superuser( - username=username, email=email, password=password, first_name=first_name, last_name=last_name) + username=username, email=email, password=password, first_name=first_name, last_name=last_name, is_technician=True) # Activate the superuser superuser.is_active = True