We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ad85758 commit 5cd07d5Copy full SHA for 5cd07d5
src/JsonApiDotNetCore/Models/RelationshipAttribute.cs
@@ -100,7 +100,12 @@ public override bool Equals(object obj)
100
return false;
101
}
102
bool equalRelationshipName = PublicRelationshipName.Equals(attr.PublicRelationshipName);
103
- bool equalPrincipalType = PrincipalType.Equals(attr.PrincipalType);
+
104
+ bool equalPrincipalType = true;
105
+ if (PrincipalType != null)
106
+ {
107
+ equalPrincipalType = PrincipalType.Equals(attr.PrincipalType);
108
+ }
109
return IsHasMany == attr.IsHasMany && equalRelationshipName && equalPrincipalType;
110
111
0 commit comments