sources/ldap: fix MonitoredTask not using uid

This commit is contained in:
Jens Langhammer
2020-10-16 16:42:46 +02:00
parent aa9c7a6567
commit 54088239ab
3 changed files with 9 additions and 3 deletions

View File

@ -32,7 +32,10 @@ def ldap_sync(self: MonitoredTask, source_pk: int):
TaskResult(
TaskResultStatus.SUCCESSFUL,
[f"Synced {user_count} users", f"Synced {group_count} groups"],
uid=source.name,
)
)
except LDAPException as exc:
self.set_status(TaskResult(TaskResultStatus.ERROR).with_error(exc))
self.set_status(
TaskResult(TaskResultStatus.ERROR, uid=source.name).with_error(exc)
)