Code development platform for open source projects from the European Union institutions

Skip to content
Snippets Groups Projects
Commit 250275be authored by Markus Quaritsch's avatar Markus Quaritsch
Browse files

addapt error messages on validating manufacturer report

parent b608590d
No related branches found
No related tags found
No related merge requests found
......@@ -79,9 +79,13 @@ namespace HashingTool.ViewModel.UserControl
}
var components = XMLManufacturerReportReader.GetContainingComponents(_xmlFile.Document).GroupBy(s => s)
.Select(g => new { Entry = g.Key, Count = g.Count() });
var jobComponents = _jobData == null ? new ViewModel.ComponentEntry[] { } : _jobData.Components.ToArray();
var jobComponents = _jobData?.JobDataValid == null || !_jobData.JobDataValid.Value ? new ViewModel.ComponentEntry[] { } : _jobData.Components.ToArray();
_validationErrors.Clear();
if (_jobData != null && _jobData.JobDataValid != null && !_jobData.JobDataValid.Value) {
_validationErrors.Add("Verifying Manufacturer Report: Job data is not valid - no validation checks against job data.");
}
var hasComponentsFromJob = _jobData != null && _jobData.JobDataValid != null && _jobData.JobDataValid.Value &&
jobComponents.Any();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment