fix registeradmin's get_random_string missing argument (#236)

This commit is contained in:
Tristan Pinaudeau 2022-10-20 20:11:38 +02:00 committed by GitHub
parent ba2f47edb7
commit aeeff26e88
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,7 @@ class Command(BaseCommand):
def handle(self, *args, **options): def handle(self, *args, **options):
email = options.get("email") email = options.get("email")
password = get_random_string() password = get_random_string(10)
User.objects.create_superuser(str(uuid.uuid4()), email=email, password=password) User.objects.create_superuser(str(uuid.uuid4()), email=email, password=password)
self.stdout.write(self.style.SUCCESS("Successfully created a Shynet superuser")) self.stdout.write(self.style.SUCCESS("Successfully created a Shynet superuser"))
self.stdout.write(f"Email address: {email}") self.stdout.write(f"Email address: {email}")