From 3cfea0619d2b6f7362bfc8274d47b13b9aec5088 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Wed, 4 Dec 2024 08:47:17 -0700 Subject: [PATCH] PR feedback --- .../management/commands/create_federal_portfolio.py | 4 ---- .../management/commands/utility/terminal_helper.py | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/registrar/management/commands/create_federal_portfolio.py b/src/registrar/management/commands/create_federal_portfolio.py index 64672366b..9cf4d36ea 100644 --- a/src/registrar/management/commands/create_federal_portfolio.py +++ b/src/registrar/management/commands/create_federal_portfolio.py @@ -174,10 +174,6 @@ class Command(BaseCommand): # Check for existing suborgs on the current portfolio existing_suborgs = Suborganization.objects.filter(name__in=org_names) if existing_suborgs.exists(): - # QUESTION FOR REVIEWERS: Should we be doing this too? - # existing_suborgs.filter(portfolio__isnull=True).update( - # portfolio=portfolio - # ) message = f"Some suborganizations already exist for portfolio '{portfolio}'." TerminalHelper.colorful_logger(logger.info, TerminalColors.OKBLUE, message) diff --git a/src/registrar/management/commands/utility/terminal_helper.py b/src/registrar/management/commands/utility/terminal_helper.py index 0352fd3bc..eed1027f7 100644 --- a/src/registrar/management/commands/utility/terminal_helper.py +++ b/src/registrar/management/commands/utility/terminal_helper.py @@ -207,9 +207,9 @@ class TerminalHelper: skipped_header = "----- SOME DATA WAS INVALID (NEEDS MANUAL PATCHING) -----" # Give the user the option to see failed / skipped records if any exist. - debug_anyway = False + display_detailed_logs = False if not debug and update_failed_count > 0 or update_skipped_count > 0: - debug_anyway = TerminalHelper.prompt_for_execution( + display_detailed_logs = TerminalHelper.prompt_for_execution( system_exit_on_terminate=False, prompt_message=f"You will see {update_failed_count} failed and {update_skipped_count} skipped records.", verify_message="** Some records were skipped, or some failed to update. **", @@ -217,7 +217,7 @@ class TerminalHelper: ) # Prepare debug messages - if debug or debug_anyway: + if debug or display_detailed_logs: updated_display = [str(u) for u in to_update] if display_as_str else to_update skipped_display = [str(s) for s in skipped] if display_as_str else skipped failed_display = [str(f) for f in failed_to_update] if display_as_str else failed_to_update