mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-05-19 19:09:22 +02:00
Some refactoring, cleanup, and fixes so that the data loads correctly. Migrations run correctly end-to-end. But unit tests need to be updated next.
This commit is contained in:
parent
795a4ec160
commit
87696d9b92
2 changed files with 426 additions and 287 deletions
|
@ -149,6 +149,7 @@ class LoadExtraTransitionDomain:
|
|||
if not all_transition_domains.exists():
|
||||
raise ValueError("No TransitionDomain objects exist.")
|
||||
|
||||
updated_trasition_domains = []
|
||||
for transition_domain in all_transition_domains:
|
||||
domain_name = transition_domain.domain_name.upper()
|
||||
updated_transition_domain = transition_domain
|
||||
|
@ -180,6 +181,7 @@ class LoadExtraTransitionDomain:
|
|||
f"Successfully updated {domain_name}"
|
||||
f"{TerminalColors.ENDC}"
|
||||
)
|
||||
updated_trasition_domains.append(updated_transition_domain)
|
||||
|
||||
|
||||
# If we run into an exception on this domain,
|
||||
|
@ -195,8 +197,7 @@ class LoadExtraTransitionDomain:
|
|||
logger.info(
|
||||
f"""{TerminalColors.OKGREEN}
|
||||
============= FINISHED ===============
|
||||
Created 123 transition domain entries,
|
||||
updated 123 transition domain entries
|
||||
updated {len(updated_trasition_domains)} transition domain entries
|
||||
{TerminalColors.ENDC}
|
||||
"""
|
||||
)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue