mirror of
https://github.com/lemeow125/Borrowing-TrackerBackend.git
synced 2024-11-17 06:19:26 +08:00
Pre-generate accounts as technicians by default
This commit is contained in:
parent
3dcd845f72
commit
3a5f872c67
1 changed files with 1 additions and 1 deletions
|
@ -75,7 +75,7 @@ def create_superuser(sender, **kwargs):
|
|||
if not User.objects.filter(username=username).exists():
|
||||
# Create the superuser with is_active set to False
|
||||
user = User.objects.create_user(
|
||||
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 user
|
||||
user.is_active = True
|
||||
|
|
Loading…
Reference in a new issue