From 023b97aa6901b8902e7c060281b6ed4fa60754e3 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Thu, 4 Nov 2021 22:13:47 +0100 Subject: [PATCH] sources/ldap: remove deprecated default Signed-off-by: Jens Langhammer --- authentik/sources/ldap/tasks.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/authentik/sources/ldap/tasks.py b/authentik/sources/ldap/tasks.py index 8f5ca65aa..e4f1f0a5b 100644 --- a/authentik/sources/ldap/tasks.py +++ b/authentik/sources/ldap/tasks.py @@ -31,8 +31,7 @@ def ldap_sync_all(): @CELERY_APP.task( bind=True, base=MonitoredTask, soft_time_limit=60 * 60 * 2, task_time_limit=60 * 60 * 2 ) -# TODO: remove Optional[str] in 2021.10 -def ldap_sync(self: MonitoredTask, source_pk: str, sync_class: Optional[str] = None): +def ldap_sync(self: MonitoredTask, source_pk: str, sync_class: str): """Synchronization of an LDAP Source""" self.result_timeout_hours = 2 try: @@ -41,8 +40,6 @@ def ldap_sync(self: MonitoredTask, source_pk: str, sync_class: Optional[str] = N # Because the source couldn't be found, we don't have a UID # to set the state with return - if not sync_class: - return sync = path_to_class(sync_class) self.set_uid(f"{slugify(source.name)}-{sync.__name__}") try: