diff --git a/aleksis/core/apps.py b/aleksis/core/apps.py index 906969c11517fcc34c41456a44457d316364e0b4..b373367efe01bd5e1d470aaeba02eabe92b9b5e5 100644 --- a/aleksis/core/apps.py +++ b/aleksis/core/apps.py @@ -21,10 +21,11 @@ class CoreConfig(AppConfig): using: str, plan: List[Tuple], apps: django.apps.registry.Apps, + **kwargs, ) -> None: super().post_migrate(app_config, verbosity, interactive, using, plan, apps) # Ensure presence of a OTP YubiKey default config - apps.get_model('otp_yubikey', 'ValidationService').objects.using(using).update_or_create( - name='default', defaults={'use_ssl': True, 'param_sl': '', 'param_timeout': ''} + apps.get_model("otp_yubikey", "ValidationService").objects.using(using).update_or_create( + name="default", defaults={"use_ssl": True, "param_sl": "", "param_timeout": ""} ) diff --git a/aleksis/core/util/apps.py b/aleksis/core/util/apps.py index 9a294f8ec34d1c1817f3e50c693e0291f741557e..2e4ab1d0a860ac8bceb26d8d14db28136af2f483 100644 --- a/aleksis/core/util/apps.py +++ b/aleksis/core/util/apps.py @@ -32,9 +32,7 @@ class AppConfig(django.apps.AppConfig): # Register system checks of this app try: - import_module( - ".".join(self.__class__.__module__.split(".")[:-1] + ["checks"]) - ) + import_module(".".join(self.__class__.__module__.split(".")[:-1] + ["checks"])) except ImportError: # ImportErrors are non-fatal because checks are optional. pass @@ -44,7 +42,7 @@ class AppConfig(django.apps.AppConfig): key: Optional[str] = "", old_value: Optional[Any] = None, new_value: Optional[Any] = None, - **kwargs + **kwargs, ) -> None: """ Called on every app instance if a Constance config chagnes, and once on startup @@ -60,6 +58,7 @@ class AppConfig(django.apps.AppConfig): using: str, plan: List[Tuple], apps: django.apps.registry.Apps, + **kwargs, ) -> None: """ Called on every app instance before its models are migrated @@ -75,6 +74,7 @@ class AppConfig(django.apps.AppConfig): using: str, plan: List[Tuple], apps: django.apps.registry.Apps, + **kwargs, ) -> None: """ Called on every app instance after its models have been migrated