Verified Commit 64cb5624 authored by dockx thibault's avatar dockx thibault
Browse files

:art: refactor(audit) - clarify empty audit entries check by using count() for better readability

1 merge request!88Resolve "[Orchestrator] - Update audit tasks to allows generation of syslog export data"
Pipeline #32687 passed with stages
in 33 seconds
Showing with 2 additions and 1 deletion
+2 -1
...@@ -136,7 +136,8 @@ class Audit implements EndpointInterface ...@@ -136,7 +136,8 @@ class Audit implements EndpointInterface
$auditEntries = $this->gateway->getLdapTasks($filter, ['*'], '', ''); $auditEntries = $this->gateway->getLdapTasks($filter, ['*'], '', '');
$this->gateway->unsetCountKeys($auditEntries); $this->gateway->unsetCountKeys($auditEntries);
if (empty($auditEntries)) { // Check if there are no audit entries
if (count($auditEntries) === 0) {
$this->gateway->updateTaskStatus($task['dn'], $task['cn'][0], '2'); $this->gateway->updateTaskStatus($task['dn'], $task['cn'][0], '2');
$result[] = ["dn" => $task['dn'], "message" => "No audit entries found to transform"]; $result[] = ["dn" => $task['dn'], "message" => "No audit entries found to transform"];
continue; continue;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment