From 3ac524b1a99791b2877176f25e272c0680d2d712 Mon Sep 17 00:00:00 2001 From: Anna Shamray Date: Tue, 20 Feb 2024 15:12:23 +0100 Subject: [PATCH] :bug: [#1] fix management command --- django_setup_configuration/configuration.py | 2 +- .../management/commands/setup_configuration.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/django_setup_configuration/configuration.py b/django_setup_configuration/configuration.py index e5dd55e..e75d422 100644 --- a/django_setup_configuration/configuration.py +++ b/django_setup_configuration/configuration.py @@ -13,7 +13,7 @@ class BaseConfigurationStep(ABC): required_settings: list[str] = [] enable_setting: str = "" - def __str__(self): + def __repr__(self): return self.verbose_name def validate_requirements(self) -> None: diff --git a/django_setup_configuration/management/commands/setup_configuration.py b/django_setup_configuration/management/commands/setup_configuration.py index 648192e..91bb48f 100644 --- a/django_setup_configuration/management/commands/setup_configuration.py +++ b/django_setup_configuration/management/commands/setup_configuration.py @@ -42,7 +42,7 @@ def handle(self, **options): # todo transaction atomic errors = ErrorDict() steps: list[BaseConfigurationStep] = [ - import_string(path) for path in settings.SETUP_CONFIGURATION_STEPS + import_string(path)() for path in settings.SETUP_CONFIGURATION_STEPS ] enabled_steps = [step for step in steps if step.is_enabled()]