From cc92e9ef3be88237508e911a5921feb48e7a48b6 Mon Sep 17 00:00:00 2001 From: fishkerez <89929372+fishkerez@users.noreply.github.com> Date: Sun, 5 Mar 2023 11:38:11 +0200 Subject: [PATCH] fix crush during patch (#99) --- backend/pkg/rest/convert/resttodb/convert.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/pkg/rest/convert/resttodb/convert.go b/backend/pkg/rest/convert/resttodb/convert.go index faaa39bc8..bfec373e9 100644 --- a/backend/pkg/rest/convert/resttodb/convert.go +++ b/backend/pkg/rest/convert/resttodb/convert.go @@ -185,7 +185,9 @@ func ConvertScan(scan *models.Scan, id string) (*database.Scan, error) { } } - ret.ScanConfigID = &scan.ScanConfig.Id + if scan.ScanConfig != nil { + ret.ScanConfigID = &scan.ScanConfig.Id + } ret.ScanEndTime = scan.EndTime