From 2e44a9099a695b3fd5c4401384f7b06125ef1092 Mon Sep 17 00:00:00 2001 From: zandercymatics <141044360+zandercymatics@users.noreply.github.com> Date: Mon, 20 Nov 2023 11:28:07 -0700 Subject: [PATCH] Bug fix Accidentally left some stray code from a minor refactor --- src/registrar/management/commands/load_organization_data.py | 2 +- src/registrar/utility/errors.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/registrar/management/commands/load_organization_data.py b/src/registrar/management/commands/load_organization_data.py index 57290a41e..2d6d7adff 100644 --- a/src/registrar/management/commands/load_organization_data.py +++ b/src/registrar/management/commands/load_organization_data.py @@ -67,7 +67,7 @@ class Command(BaseCommand): # If any key in skipped_fields has a value, then # we override what is specified in the JSON. - if options not in skipped_fields or options[key] is not None: + if options not in skipped_fields: options[key] = value except Exception as err: diff --git a/src/registrar/utility/errors.py b/src/registrar/utility/errors.py index 71ffdb7ed..ba9e9aaa6 100644 --- a/src/registrar/utility/errors.py +++ b/src/registrar/utility/errors.py @@ -58,6 +58,12 @@ contact help@get.gov class LoadOrganizationErrorCodes(IntEnum): + """Used when running the load_organization_data script + Overview of error codes: + - 1 TRANSITION_DOMAINS_NOT_FOUND + - 2 UPDATE_DOMAIN_INFO_FAILED + - 3 EMPTY_TRANSITION_DOMAIN_TABLE + """ TRANSITION_DOMAINS_NOT_FOUND = 1 UPDATE_DOMAIN_INFO_FAILED = 2 EMPTY_TRANSITION_DOMAIN_TABLE = 3