From 5f75870d9edcefd6e1673bcf7ab2fc2a7cadda0d Mon Sep 17 00:00:00 2001 From: John Cardinal Date: Mon, 17 Apr 2023 19:50:49 +0000 Subject: [PATCH] case 4504 --- server/biz/SubscriptionBiz.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/biz/SubscriptionBiz.cs b/server/biz/SubscriptionBiz.cs index 3260c37..01c2a38 100644 --- a/server/biz/SubscriptionBiz.cs +++ b/server/biz/SubscriptionBiz.cs @@ -68,7 +68,7 @@ namespace Sockeye.Biz // internal async Task 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);