Skip to content

Commit

Permalink
Fix System.NotSupportedException on User profile page (#3943)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavierdecoster committed May 18, 2017
1 parent 3d34a45 commit 6b4af56
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/NuGetGallery/Services/PackageService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,8 @@ private void MergeLatestPackagesByOwner(User user, bool includeUnlisted, Diction
{
latestPackageVersions = _packageRegistrationRepository.GetAll()
.Where(pr => pr.Owners.Where(owner => owner.Username == user.Username).Any())
.Select(pr => pr.Packages.OrderByDescending(p => p.Version).First())
.Select(pr => pr.Packages.OrderByDescending(p => p.Version).FirstOrDefault())
.Where(p => p != null)
.Include(p => p.PackageRegistration)
.Include(p => p.PackageRegistration.Owners);
}
Expand Down

0 comments on commit 6b4af56

Please sign in to comment.