*: fix formatting
This commit is contained in:
@ -21,7 +21,12 @@ def ldap_sync_all():
|
||||
@CELERY_APP.task(bind=True, base=MonitoredTask)
|
||||
def ldap_sync(self: MonitoredTask, source_pk: int):
|
||||
"""Synchronization of an LDAP Source"""
|
||||
source: LDAPSource = LDAPSource.objects.get(pk=source_pk)
|
||||
try:
|
||||
source: LDAPSource = LDAPSource.objects.get(pk=source_pk)
|
||||
except LDAPSource.DoesNotExist:
|
||||
# Because the source couldn't be found, we don't have a UID
|
||||
# to set the state with
|
||||
return
|
||||
self.set_uid(slugify(source.name))
|
||||
try:
|
||||
syncer = LDAPSynchronizer(source)
|
||||
|
||||
Reference in New Issue
Block a user