diff --git a/openbb_terminal/core/plots/backend.py b/openbb_terminal/core/plots/backend.py index 8955796855c..e8433e98f2e 100644 --- a/openbb_terminal/core/plots/backend.py +++ b/openbb_terminal/core/plots/backend.py @@ -441,7 +441,7 @@ class Backend(PyWry): self.check_backend() endpoint = {True: "login", False: "logout"}[login] - if str(os.environ.get("DEBUG_MODE", "false")).lower() != "true": + if str(os.environ.get("DEBUG_MODE", "false")).lower() == "true": json_url = f"https://my.openbb.dev/{endpoint}?pywry=true" else: json_url = f"https://my.openbb.co/{endpoint}?pywry=true" diff --git a/openbb_terminal/core/session/constants.py b/openbb_terminal/core/session/constants.py index 21fdee6bee7..2d2fb992e0f 100644 --- a/openbb_terminal/core/session/constants.py +++ b/openbb_terminal/core/session/constants.py @@ -1,6 +1,6 @@ from os import environ -if str(environ.get("DEBUG_MODE", "false")).lower() != "true": +if str(environ.get("DEBUG_MODE", "false")).lower() == "true": BASE_URL = "https://payments.openbb.dev/" HUB_URL = "https://my.openbb.dev/" else: diff --git a/openbb_terminal/core/session/hub_model.py b/openbb_terminal/core/session/hub_model.py index 4fc99c5c582..1c112ed7ec2 100644 --- a/openbb_terminal/core/session/hub_model.py +++ b/openbb_terminal/core/session/hub_model.py @@ -479,10 +479,12 @@ def upload_routine( if response.status_code == 200: username = get_current_user().profile.username console.print("[green]Successfully uploaded your routine.[/green]") - if str(environ.get("DEBUG_MODE", "false")).lower() != "true": + + if str(environ.get("DEBUG_MODE", "false")).lower() == "true": run_env = "dev" else: run_env = "co" + if public: console.print(f"\n[yellow]Share or edit it at https://my.openbb.{run_env}/u/{username}/routine/{name.replace(' ', '-')}[/yellow]") else: