mirror of
https://github.com/xcp-ng/xenadmin.git
synced 2025-01-20 15:29:26 +01:00
CP-41573: Improve comparison logic for problems
Signed-off-by: Danilo Del Busso <danilo.delbusso@cloud.com>
This commit is contained in:
parent
f707b0daca
commit
5f5695057d
@ -104,7 +104,7 @@ namespace XenAdmin.Diagnostics.Problems
|
||||
result = string.Compare(Title, other.Title, StringComparison.InvariantCulture);
|
||||
|
||||
if (result == 0 && Check?.XenObjects != null && other.Check?.XenObjects != null)
|
||||
result = Check.XenObjects.Count.CompareTo(other.Check.XenObjects.Count);
|
||||
result = Check.XenObjects.SequenceEqual(other.Check.XenObjects) ? 0 : Check.XenObjects.Count.CompareTo(other.Check.XenObjects.Count);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
@ -230,10 +230,10 @@ namespace XenAdmin.Wizards.PatchingWizard
|
||||
if (problem is HostNotLive)
|
||||
{
|
||||
// this host is no longer live -> remove all previous problems regarding this host
|
||||
Problem curProblem = problem;
|
||||
var curProblem = problem;
|
||||
ProblemsResolvedPreCheck.RemoveAll(p =>
|
||||
p.Check?.XenObjects != null && p.Check.XenObjects.Count > 0 &&
|
||||
curProblem.Check?.XenObjects != null && curProblem.Check.XenObjects.Count > 0 &&
|
||||
p.Check?.XenObjects != null &&
|
||||
curProblem.Check?.XenObjects != null &&
|
||||
p.Check.XenObjects.SequenceEqual(curProblem.Check.XenObjects)
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user