Skip to content

Commit f21862c

Browse files
committed
2 parents 6a0cc58 + 2c6f751 commit f21862c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/JsonApiDotNetCore/Serialization/JsonApiDeSerializer.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -146,11 +146,11 @@ private object SetEntityAttributes(
146146
{
147147
if (attributeValues.TryGetValue(attr.PublicAttributeName, out object newValue))
148148
{
149+
if (attr.IsImmutable)
150+
continue;
149151
var convertedValue = ConvertAttrValue(newValue, attr.PropertyInfo.PropertyType);
150152
attr.SetValue(entity, convertedValue);
151-
152-
if (attr.IsImmutable == false)
153-
_jsonApiContext.AttributesToUpdate[attr] = convertedValue;
153+
_jsonApiContext.AttributesToUpdate[attr] = convertedValue;
154154
}
155155
}
156156

0 commit comments

Comments
 (0)