Skip to content

Commit b51d681

Browse files
committed
Add missing null checks
1 parent 11894ad commit b51d681

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

src/JsonApiDotNetCore/Queries/FieldSelectors.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,10 @@ public void IncludeAttributes(IEnumerable<AttrAttribute> attributes)
5252
}
5353
}
5454

55-
public void IncludeRelationship(RelationshipAttribute relationship, QueryLayer? queryLayer)
55+
public void IncludeRelationship(RelationshipAttribute relationship, QueryLayer queryLayer)
5656
{
5757
ArgumentGuard.NotNull(relationship);
58+
ArgumentGuard.NotNull(queryLayer);
5859

5960
this[relationship] = queryLayer;
6061
}

src/JsonApiDotNetCore/Repositories/EntityFrameworkCoreRepository.cs

+2
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ public virtual Task<TResource> GetForCreateAsync(Type resourceClrType, TId id, C
163163
id
164164
});
165165

166+
ArgumentGuard.NotNull(resourceClrType);
167+
166168
var resource = (TResource)_resourceFactory.CreateInstance(resourceClrType);
167169
resource.Id = id;
168170

0 commit comments

Comments
 (0)