Fix equality check on property group (#13133)
* Fix equality check on property group
Also fix circular reference on PropertyTypeCollection
(cherry picked from commit f64f634979)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
391bfb73e8
commit
7208f591c7
@@ -2,6 +2,7 @@ using System.Collections.Specialized;
|
||||
using System.Diagnostics;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
using Umbraco.Cms.Core.Models.Entities;
|
||||
|
||||
namespace Umbraco.Cms.Core.Models;
|
||||
@@ -132,7 +133,7 @@ public class PropertyGroup : EntityBase, IEquatable<PropertyGroup>
|
||||
}
|
||||
|
||||
public bool Equals(PropertyGroup? other) =>
|
||||
base.Equals(other) || (other != null && Type == other.Type && Alias == other.Alias);
|
||||
base.Equals(other) || (other != null && Type == other.Type && Alias == other.Alias && Id == other.Id);
|
||||
|
||||
public override int GetHashCode() => (base.GetHashCode(), Type, Alias).GetHashCode();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user