mirror of
https://github.com/cisagov/manage.get.gov.git
synced 2025-08-23 01:32:25 +02:00
PR changes
This commit is contained in:
parent
cfe177612a
commit
75f4e7f4b1
5 changed files with 21 additions and 55 deletions
|
@ -5,6 +5,7 @@ import logging
|
|||
import argparse
|
||||
|
||||
from collections import defaultdict
|
||||
from django.conf import settings
|
||||
|
||||
from django.core.management import BaseCommand
|
||||
from registrar.management.commands.utility.epp_data_containers import EnumFilenames
|
||||
|
@ -63,12 +64,15 @@ class Command(BaseCommand):
|
|||
action=argparse.BooleanOptionalAction,
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--infer_filenames",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Determines if we should infer filenames or not."
|
||||
"Recommended to be enabled only in a development or testing setting.",
|
||||
)
|
||||
# This option should only be available when developing locally.
|
||||
# This should not be available to the end user.
|
||||
if settings.DEBUG:
|
||||
parser.add_argument(
|
||||
"--infer_filenames",
|
||||
action=argparse.BooleanOptionalAction,
|
||||
help="Determines if we should infer filenames or not."
|
||||
"Recommended to be enabled only in a development or testing setting.",
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
"--directory", default="migrationdata", help="Desired directory"
|
||||
|
@ -322,6 +326,9 @@ class Command(BaseCommand):
|
|||
**options,
|
||||
):
|
||||
"""Parse the data files and create TransitionDomains."""
|
||||
if not settings.DEBUG:
|
||||
options["infer_filenames"] = False
|
||||
|
||||
args = TransitionDomainArguments(**options)
|
||||
|
||||
# Desired directory for additional TransitionDomain data
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue