diff options
Diffstat (limited to 'ctrack/core')
-rw-r--r-- | ctrack/core/management/commands/populate_db.py | 11 | ||||
-rw-r--r-- | ctrack/core/utils.py | 3 |
2 files changed, 4 insertions, 10 deletions
diff --git a/ctrack/core/management/commands/populate_db.py b/ctrack/core/management/commands/populate_db.py index 5b8f541..fe6aa4e 100644 --- a/ctrack/core/management/commands/populate_db.py +++ b/ctrack/core/management/commands/populate_db.py @@ -1,6 +1,5 @@ - from django.core.management import BaseCommand -from django.core.management import CommandParser + from ctrack.core.utils import populate_db @@ -9,16 +8,12 @@ class Command(BaseCommand): Creates a large test fixture. """ - def add_arguments(self, parser: CommandParser) -> None: - parser.add_argument("number", nargs=1, type=int) - def handle(self, *args, **options): - number = options["number"][0] - populate_db(number) + populate_db() # TODO - adapt this so that it records more than just Persons created self.stdout.write( self.style.SUCCESS( - f"Created {number} Person object[s]! Go forth and multiply." + f"Created test fixture successfully." ) ) diff --git a/ctrack/core/utils.py b/ctrack/core/utils.py index 039348d..1f9e518 100644 --- a/ctrack/core/utils.py +++ b/ctrack/core/utils.py @@ -51,8 +51,7 @@ def _create_caf_app_service(c_descriptors, org, q_descriptors): ) -def populate_db(persons): - number = persons +def populate_db(): # Set up some reasonable Modes and SubModes m1 = Mode.objects.create(descriptor="Rail") |