Pre-generate accounts as technicians by default

This commit is contained in:
Keannu Bernasol 2023-11-19 19:06:03 +08:00
parent 3a5f872c67
commit 079b88fe7f

View file

@ -59,7 +59,7 @@ def create_superuser(sender, **kwargs):
if not User.objects.filter(username=username).exists(): if not User.objects.filter(username=username).exists():
# Create the superuser with is_active set to False # Create the superuser with is_active set to False
superuser = User.objects.create_superuser( 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 # Activate the superuser
superuser.is_active = True superuser.is_active = True