mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-31 01:33:56 +02:00
updates & fixes
This commit is contained in:
parent
59cb3cc0de
commit
d9796a15af
3 changed files with 26 additions and 3 deletions
|
@ -66,6 +66,8 @@ class Command(BaseCommand):
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO - Narrow this down
|
# TODO - Narrow this down
|
||||||
|
# TODO - this isn't pulling in the directory from the master script. Needs to be corrected @Nicolle - todo
|
||||||
|
# default="/app/tmp"
|
||||||
parser.add_argument(
|
parser.add_argument(
|
||||||
"--directory", default="migrationdata", help="Desired directory"
|
"--directory", default="migrationdata", help="Desired directory"
|
||||||
)
|
)
|
||||||
|
@ -291,8 +293,9 @@ class Command(BaseCommand):
|
||||||
# Update every TransitionDomain object where applicable
|
# Update every TransitionDomain object where applicable
|
||||||
extra_data.update_transition_domain_models()
|
extra_data.update_transition_domain_models()
|
||||||
except Exception as err:
|
except Exception as err:
|
||||||
logger.error("Could not load additional TransitionDomain data.")
|
logger.error(f"Could not load additional TransitionDomain data. {err}")
|
||||||
raise err
|
raise err
|
||||||
|
# TODO: handle this better...needs more logging
|
||||||
|
|
||||||
def handle( # noqa: C901
|
def handle( # noqa: C901
|
||||||
self,
|
self,
|
||||||
|
@ -540,7 +543,7 @@ class Command(BaseCommand):
|
||||||
# Prompt the user if they want to load additional data on the domains
|
# Prompt the user if they want to load additional data on the domains
|
||||||
title = "Do you wish to load additional data for TransitionDomains?"
|
title = "Do you wish to load additional data for TransitionDomains?"
|
||||||
do_parse_extra = TerminalHelper.prompt_for_execution(
|
do_parse_extra = TerminalHelper.prompt_for_execution(
|
||||||
system_exit_on_terminate=True,
|
system_exit_on_terminate=False,
|
||||||
info_to_inspect=f"""
|
info_to_inspect=f"""
|
||||||
!!! ENSURE THAT ALL FILENAMES ARE CORRECT BEFORE PROCEEDING
|
!!! ENSURE THAT ALL FILENAMES ARE CORRECT BEFORE PROCEEDING
|
||||||
==Federal agency information==
|
==Federal agency information==
|
||||||
|
|
|
@ -28,8 +28,12 @@ logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
|
||||||
class Command(BaseCommand):
|
class Command(BaseCommand):
|
||||||
help = """ """
|
help = """ """ # TODO: update this!
|
||||||
|
|
||||||
|
|
||||||
|
# ======================================================
|
||||||
|
# ================== ARGUMENTS ===================
|
||||||
|
# ======================================================
|
||||||
def add_arguments(self, parser):
|
def add_arguments(self, parser):
|
||||||
"""
|
"""
|
||||||
OPTIONAL ARGUMENTS:
|
OPTIONAL ARGUMENTS:
|
||||||
|
@ -134,6 +138,11 @@ class Command(BaseCommand):
|
||||||
action=argparse.BooleanOptionalAction,
|
action=argparse.BooleanOptionalAction,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# ======================================================
|
||||||
|
# =============== DATA ANALYSIS ==================
|
||||||
|
# ======================================================
|
||||||
|
|
||||||
def compare_tables(self, debug_on: bool):
|
def compare_tables(self, debug_on: bool):
|
||||||
"""Does a diff between the transition_domain and the following tables:
|
"""Does a diff between the transition_domain and the following tables:
|
||||||
domain, domain_information and the domain_invitation.
|
domain, domain_information and the domain_invitation.
|
||||||
|
@ -252,6 +261,10 @@ class Command(BaseCommand):
|
||||||
"""
|
"""
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
# ======================================================
|
||||||
|
# ================= MIGRATIONS ===================
|
||||||
|
# ======================================================
|
||||||
def run_load_transition_domain_script(
|
def run_load_transition_domain_script(
|
||||||
self,
|
self,
|
||||||
file_location: str,
|
file_location: str,
|
||||||
|
|
|
@ -70,6 +70,13 @@ class TerminalHelper:
|
||||||
else:
|
else:
|
||||||
logger.info("Please respond with 'yes' or 'no' " "(or 'y' or 'n').\n")
|
logger.info("Please respond with 'yes' or 'no' " "(or 'y' or 'n').\n")
|
||||||
|
|
||||||
|
# @staticmethod
|
||||||
|
# def array_as_string(array_to_convert: []) -> str:
|
||||||
|
# array_as_string = "{}".format(
|
||||||
|
# ", ".join(map(str, array_to_convert))
|
||||||
|
# )
|
||||||
|
# return array_as_string
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def print_conditional(
|
def print_conditional(
|
||||||
print_condition: bool,
|
print_condition: bool,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue