Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix InvalidOperationException from profile when multiple version are set to latest #4282

Merged
merged 2 commits into from
Jun 26, 2017

Conversation

chenriksson
Copy link
Member

@chenriksson chenriksson commented Jun 26, 2017

Fix for #4281

Note that this selects later version if multiple since order by is descending, whereas DisplayPackage history selects earlier version due to using First with order ascending.

Will file separate bug to fix IsLatest flags with reflow package, as well as trying to make selection of later latest consistent.

Copy link
Contributor

@agr agr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix the comments, please

@@ -301,16 +301,18 @@ private void MergeLatestStablePackagesByOwner(User user, bool includeUnlisted, D

foreach (var latestStablePackagesById in latestStablePackageVersions.ToList().GroupBy(p => p.PackageRegistration.Id))
{
// Use First() instead of Select() to get the latest package, in case there are multiple latest due to concurrency issue
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean Single instead of Select, right?
(below, on line 344, too)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes :-)

@chenriksson chenriksson merged commit 95190d3 into dev Jun 26, 2017
@chenriksson chenriksson deleted the chenriks-profilebug branch June 26, 2017 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants