-
Notifications
You must be signed in to change notification settings - Fork 643
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix NullReferenceException on GET Users/Packages by including Package…
…Registration in queries to retrieve PackageOwnershipRequest (#4882)
- Loading branch information
1 parent
c591f15
commit 5e44c07
Showing
3 changed files
with
12 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 4 additions & 9 deletions
13
src/NuGetGallery/ViewModels/OwnerRequestsListItemViewModel.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,18 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the Apache License, Version 2.0. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Web; | ||
|
||
namespace NuGetGallery | ||
{ | ||
public class OwnerRequestsListItemViewModel | ||
{ | ||
public PackageOwnerRequest Request { get; } | ||
|
||
public Package Package { get; } | ||
|
||
public OwnerRequestsListItemViewModel(PackageOwnerRequest request, IPackageService packageService) | ||
{ | ||
Request = request; | ||
Package = packageService.FindPackageByIdAndVersion(request.PackageRegistration.Id, version: null, semVerLevelKey: SemVerLevelKey.SemVer2, allowPrerelease: true); | ||
} | ||
|
||
public PackageOwnerRequest Request { get; } | ||
|
||
public Package Package { get; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters