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 c5dfe189f7
commit d18e829d80
1 changed files with 4 additions and 1 deletions

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: