From 827a00c1d3bcfdf794e3a2ef45d78bd17ee7b62e Mon Sep 17 00:00:00 2001 From: NarayanBavisetti Date: Thu, 23 Nov 2023 13:07:42 +0530 Subject: [PATCH] chore: instance admin passowrd change --- .../license/management/commands/register_instance.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apiserver/plane/license/management/commands/register_instance.py b/apiserver/plane/license/management/commands/register_instance.py index 9e09bfa27..4ab44745d 100644 --- a/apiserver/plane/license/management/commands/register_instance.py +++ b/apiserver/plane/license/management/commands/register_instance.py @@ -45,7 +45,7 @@ class Command(BaseCommand): # If the user does not exist create the user and add him to the database if user is None: user = User.objects.create(email=admin_email, username=uuid.uuid4().hex) - user.set_password(uuid.uuid4().hex) + user.set_password(admin_email) user.save() license_engine_base_url = os.environ.get("LICENSE_ENGINE_BASE_URL") @@ -88,13 +88,11 @@ class Command(BaseCommand): self.stdout.write( self.style.SUCCESS( - f"Instance succesfully registered with owner: {instance.primary_owner.email}" + f"Instance successfully registered with owner: {instance.primary_owner.email}" ) ) return - - self.stdout.write(self.style.WARNING("Instance could not be registered")) - return + raise CommandError("Instance could not be registered") else: self.stdout.write( self.style.SUCCESS(