Skip to content
This repository was archived by the owner on Oct 14, 2020. It is now read-only.

Commit 753a34e

Browse files
committed
Fix return values
1 parent e6f4e76 commit 753a34e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

operator/controllers/execution/scan_controller.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ func (r *ScanReconciler) executeReadAndWriteHooks(scan *executionv1.Scan) error
11451145
}
11461146

11471147
if err := r.Create(ctx, job); err != nil {
1148-
r.Log.Error(err, "Unable to create Job for ReadOnlyHook", "job", job)
1148+
r.Log.Error(err, "Unable to create Job for ReadAndWriteHook", "job", job)
11491149
return err
11501150
}
11511151

@@ -1160,7 +1160,7 @@ func (r *ScanReconciler) executeReadAndWriteHooks(scan *executionv1.Scan) error
11601160
r.Log.Error(err, "unable to update Scan status")
11611161
return err
11621162
}
1163-
return err
1163+
return nil
11641164
}
11651165

11661166
if nonCompletedHook.State == executionv1.InProgress {
@@ -1181,11 +1181,10 @@ func (r *ScanReconciler) executeReadAndWriteHooks(scan *executionv1.Scan) error
11811181
r.Log.Error(err, "unable to update Scan status")
11821182
return err
11831183
}
1184-
return err
1184+
return nil
11851185
case incomplete:
11861186
// Still waiting for job to finish
1187-
return err
1188-
1187+
return nil
11891188
case failed:
11901189
for i, hookStatus := range scan.Status.ReadAndWriteHookStatus {
11911190
if hookStatus.HookName == nonCompletedHook.HookName {

0 commit comments

Comments
 (0)