From 6e7e7d3456331425cda9e26714f005b2d525ebf1 Mon Sep 17 00:00:00 2001 From: Dominik George <dominik.george@teckids.org> Date: Sun, 1 Dec 2019 01:12:32 +0100 Subject: [PATCH] Remove conditional block in setup_data as otp_yubikey is now mandatory. --- biscuit/core/apps.py | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/biscuit/core/apps.py b/biscuit/core/apps.py index 229d3bc09..78aba32f8 100644 --- a/biscuit/core/apps.py +++ b/biscuit/core/apps.py @@ -20,13 +20,12 @@ class CoreConfig(AppConfig): pass # noqa def setup_data(self) -> None: - if 'otp_yubikey' in settings.INSTALLED_APPS: - try: - apps.get_model('otp_yubikey', 'ValidationService').objects.update_or_create( - name='default', defaults={'use_ssl': True, 'param_sl': '', 'param_timeout': ''} - ) - except ProgrammingError: - warn('Yubikey validation service could not be created yet. If you are currently in a migration, this is expected.') + try: + apps.get_model('otp_yubikey', 'ValidationService').objects.update_or_create( + name='default', defaults={'use_ssl': True, 'param_sl': '', 'param_timeout': ''} + ) + except ProgrammingError: + warn('Yubikey validation service could not be created yet. If you are currently in a migration, this is expected.') def ready(self) -> None: self.clean_scss() -- GitLab