case 4504

This commit is contained in:
2023-04-17 19:50:49 +00:00
parent f4e7f7b758
commit 5f75870d9e

View File

@@ -68,7 +68,7 @@ namespace Sockeye.Biz
//
internal async Task<Subscription> GetAsync(long id, bool logTheGetEvent = true)
{
var ret = await ct.Subscription.Include(z => z.Items.OrderBy(x => x.ExpireDate)).AsNoTracking().SingleOrDefaultAsync(z => z.Id == id);
var ret = await ct.Subscription.Include(z => z.Items.OrderByDescending(x=>x.Active).ThenBy(x => x.ExpireDate)).AsNoTracking().SingleOrDefaultAsync(z => z.Id == id);
if (logTheGetEvent && ret != null)
await EventLogProcessor.LogEventToDatabaseAsync(new Event(UserId, id, BizType, SockEvent.Retrieved), ct);
await PopulateVizFields(ret);