From 0d2a4e5ad65ff6fda89430779217c10668d988e5 Mon Sep 17 00:00:00 2001 From: Xavier Decoster Date: Mon, 24 Apr 2017 11:07:29 +0200 Subject: [PATCH] Set SemVerLevelKey after setting Dependencies --- src/NuGetGallery/Services/PackageService.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/NuGetGallery/Services/PackageService.cs b/src/NuGetGallery/Services/PackageService.cs index 3237196709..7327ef214f 100644 --- a/src/NuGetGallery/Services/PackageService.cs +++ b/src/NuGetGallery/Services/PackageService.cs @@ -546,10 +546,7 @@ public virtual Package EnrichPackageFromNuGetPackage( // However, we do also store a normalized copy for looking up later. package.Version = packageMetadata.Version.OriginalVersion; package.NormalizedVersion = packageMetadata.Version.ToNormalizedString(); - - // Identify the SemVerLevelKey using the original package version string and package dependencies - package.SemVerLevelKey = SemVerLevelKey.ForPackage(packageMetadata.Version, package.Dependencies); - + package.Description = packageMetadata.Description; package.ReleaseNotes = packageMetadata.ReleaseNotes; package.HashAlgorithm = packageStreamMetadata.HashAlgorithm; @@ -609,6 +606,9 @@ public virtual Package EnrichPackageFromNuGetPackage( package.FlattenedDependencies = package.Dependencies.Flatten(); package.FlattenedPackageTypes = package.PackageTypes.Flatten(); + + // Identify the SemVerLevelKey using the original package version string and package dependencies + package.SemVerLevelKey = SemVerLevelKey.ForPackage(packageMetadata.Version, package.Dependencies); return package; }