From e848601f7949ccbbdf29dde73fc29542311214b9 Mon Sep 17 00:00:00 2001 From: Brian Wiborg Date: Wed, 8 Oct 2025 12:41:05 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Use=20set=5Femail=20in=20creates?= =?UTF-8?q?uperuser?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/ohmyapi/cli.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/ohmyapi/cli.py b/src/ohmyapi/cli.py index 6728753..37727e0 100644 --- a/src/ohmyapi/cli.py +++ b/src/ohmyapi/cli.py @@ -75,7 +75,7 @@ def shell(root: str = "."): asyncio.set_event_loop(loop) loop.run_until_complete(init_and_cleanup()) - # Prepare shell vars that are to be directly available + # Prepare shell vars that are to be immediately available shell_vars = {"p": project} try: @@ -150,8 +150,9 @@ def createsuperuser(root: str = "."): if password1 != password2: print("Passwords didn't match!") user = ohmyapi_auth.models.User( - email=email, username=username, is_staff=True, is_admin=True + username=username, is_staff=True, is_admin=True ) + user.set_email(email) user.set_password(password1) asyncio.run(project.init_orm()) asyncio.run(user.save())