diff --git a/src/Umbraco.Core/Models/PropertyGroup.cs b/src/Umbraco.Core/Models/PropertyGroup.cs index 034770cdfc..9d23c85a9b 100644 --- a/src/Umbraco.Core/Models/PropertyGroup.cs +++ b/src/Umbraco.Core/Models/PropertyGroup.cs @@ -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 } 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(); diff --git a/src/Umbraco.Core/Models/PropertyTypeCollection.cs b/src/Umbraco.Core/Models/PropertyTypeCollection.cs index 49c83b4c9d..77a5d84421 100644 --- a/src/Umbraco.Core/Models/PropertyTypeCollection.cs +++ b/src/Umbraco.Core/Models/PropertyTypeCollection.cs @@ -30,7 +30,7 @@ public class PropertyTypeCollection : KeyedCollection, IN // This baseclass calling is needed, else compiler will complain about nullability /// - public bool IsReadOnly => ((ICollection)this).IsReadOnly; + public bool IsReadOnly => false; // 'new' keyword is required! we can explicitly implement ICollection.Add BUT since normally a concrete PropertyType type // is passed in, the explicit implementation doesn't get called, this ensures it does get called.