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