From 6cf9c811ae53e620a1d2b2f89d2bd52267718cbc Mon Sep 17 00:00:00 2001 From: Anastasia Gradova <108748167+anagradova@users.noreply.github.com> Date: Mon, 4 Mar 2024 15:59:44 -0700 Subject: [PATCH] Update app/commands.py Co-authored-by: Carlo Costino --- app/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/commands.py b/app/commands.py index 2c6d6bf75..707cab466 100644 --- a/app/commands.py +++ b/app/commands.py @@ -859,6 +859,9 @@ fake = Faker(["en_US"]) @notify_command(name="add-test-organizations-to-db") @click.option("-g", "--generate", required=True, prompt=True, default=1) def add_test_organizations_to_db(generate): + if getenv("NOTIFY_ENVIRONMENT", "") not in ["development", "test"]: + current_app.logger.error("Can only be run in development") + return def generate_gov_agency(): agency_names = [ "Bureau",