diff --git a/conreq/_core/base/management/commands/start_app.py b/conreq/_core/base/management/commands/start_app.py index 0c2c8f99..bb4e3f22 100644 --- a/conreq/_core/base/management/commands/start_app.py +++ b/conreq/_core/base/management/commands/start_app.py @@ -11,9 +11,10 @@ class Command(TemplateCommand): # pylint: disable=arguments-differ def handle(self, app_name: str, **options: dict): - package_name = options.get("package") - if not package_name: - package_name = input("Package Name: ").replace(" ", "_") + package_name = options.get("package") or input("Package Name: ").replace( + " ", "_" + ) + name = app_name app_or_project = "app" target = str(PACKAGES_DIR / package_name / "apps" / "") diff --git a/conreq/utils/environment.py b/conreq/utils/environment.py index 012def9c..347b7584 100644 --- a/conreq/utils/environment.py +++ b/conreq/utils/environment.py @@ -149,9 +149,9 @@ def set_env(name: str, value: str, sys_env=False, dot_env=True) -> Tuple[str, st if value is None: value = "" if sys_env: - os.environ[ENV_PREFIX + name.upper()] = str(value) + os.environ[ENV_PREFIX + name.upper()] = value if dot_env: - dotenv.set_key(dotenv_path(), name.upper(), str(value)) + dotenv.set_key(dotenv_path(), name.upper(), value) return (name, value)