Fixed duplicate UpdateHistory items

(cherry picked from commit ad9e709d96a4c8635f52e9ee8623fa805e628de6)
This commit is contained in:
Taloth Saldono 2020-11-15 13:16:15 +01:00 committed by Qstick
parent 79d4e0da80
commit 1df31f9059

View file

@ -25,7 +25,7 @@ public UpdateHistoryRepository(ILogDatabase logDatabase, IEventAggregator eventA
public UpdateHistory LastInstalled()
{
var history = Query(x => x.EventType == UpdateHistoryEventType.Installed)
.OrderBy(v => v.Date)
.OrderByDescending(v => v.Date)
.Take(1)
.FirstOrDefault();
@ -35,7 +35,7 @@ public UpdateHistory LastInstalled()
public UpdateHistory PreviouslyInstalled()
{
var history = Query(x => x.EventType == UpdateHistoryEventType.Installed)
.OrderBy(v => v.Date)
.OrderByDescending(v => v.Date)
.Skip(1)
.Take(1)
.FirstOrDefault();