adapts to spring cleaning in authentic (#32866)

See #32934.
This commit is contained in:
Benjamin Dauvergne 2019-05-09 19:19:18 +02:00
parent 2746d095c5
commit beca608c97
1 changed files with 2 additions and 5 deletions

View File

@ -45,14 +45,11 @@ except ImportError:
from authentic2 import app_settings as a2_app_settings
from authentic2 import utils as a2_utils, hooks, constants
from authentic2.a2_rbac.utils import get_default_ou
from authentic2.forms.passwords import SetPasswordForm
from . import app_settings, models, utils
SET_PASSWORD_FORM_CLASS = a2_utils.import_module_or_class(
a2_app_settings.A2_REGISTRATION_SET_PASSWORD_FORM_CLASS)
class LoggerMixin(object):
def __init__(self, *args, **kwargs):
self.logger = logging.getLogger(__name__)
@ -518,7 +515,7 @@ class UnlinkView(LoggerMixin, FormView):
def get_form_class(self):
form_class = Form
if self.must_set_password():
form_class = SET_PASSWORD_FORM_CLASS
form_class = SetPasswordForm
return form_class
def get_form_kwargs(self, **kwargs):