Merge pull request #1128 from GaborApatiNagy/REQ-156_github

CA-217232: Fixed regression caused by the fix for CA-216935
This commit is contained in:
Konstantina Chremmou 2016-08-19 10:42:41 +01:00 committed by GitHub
commit 0cd8391feb
2 changed files with 7 additions and 7 deletions

View File

@ -32,15 +32,15 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
public override bool Equals(object obj)
{
if (!(obj is PoolPatchMapping))
return false;
var that = obj as PoolPatchMapping;
if (that == null)
return false;
return
this.XenServerPatch == that.XenServerPatch
&& this.Pool_patch == that.Pool_patch
&& this.MasterHost == that.MasterHost;
this.XenServerPatch != null && this.XenServerPatch.Equals(that.XenServerPatch)
&& this.Pool_patch != null && this.Pool_patch.Equals(that.Pool_patch)
&& this.MasterHost != null && that.MasterHost != null & this.MasterHost.uuid == that.MasterHost.uuid;
}
public override int GetHashCode()

View File

@ -65,7 +65,7 @@ namespace XenAdmin.Wizards.PatchingWizard.PlanActions
var conn = session.Connection;
var master = Helpers.GetMaster(conn);
var existingMapping = mappings.Find(m => m.MasterHost.uuid == master.uuid && m.Pool_patch != null && m.XenServerPatch == patch);
var existingMapping = mappings.Find(m => m.MasterHost.uuid == master.uuid && m.Pool_patch != null && m.XenServerPatch.Equals(patch));
if (existingMapping == null
|| !poolPatches.Any(p => string.Equals(p.uuid, existingMapping.Pool_patch.uuid, StringComparison.OrdinalIgnoreCase)))