providers/ldap: fix error in outpost when certificate is configured

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-08-09 20:47:26 +02:00
parent 0e131e6b2f
commit 281a460960

View file

@ -78,7 +78,10 @@ class LDAPProvider(OutpostModel, Provider):
return f"LDAP Provider {self.name}"
def get_required_objects(self) -> Iterable[Union[models.Model, str]]:
return [self, "authentik_core.view_user", "authentik_core.view_group"]
required_models = [self, "authentik_core.view_user", "authentik_core.view_group"]
if self.certificate is not None:
required_models.append(self.certificate)
return required_models
class Meta: