diff --git a/src/Infrastructure.Dapper/Repositories/CollectionRepository.cs b/src/Infrastructure.Dapper/Repositories/CollectionRepository.cs index 81d45bcf43..30956c8255 100644 --- a/src/Infrastructure.Dapper/Repositories/CollectionRepository.cs +++ b/src/Infrastructure.Dapper/Repositories/CollectionRepository.cs @@ -197,7 +197,7 @@ public class CollectionRepository : Repository, ICollectionRep var collectionDetails = await results.ReadFirstOrDefaultAsync(); - if (!includeAccessRelationships) return collectionDetails; + if (!includeAccessRelationships || collectionDetails == null) return collectionDetails; collectionDetails.Groups = (await results.ReadAsync()).ToList(); collectionDetails.Users = (await results.ReadAsync()).ToList();