🐛 Another fix to prevent the subscription get wrong data
This commit is contained in:
@@ -431,6 +431,7 @@ public class SubscriptionService(
|
|||||||
.Where(s => s.EndedAt == null || s.EndedAt > now)
|
.Where(s => s.EndedAt == null || s.EndedAt > now)
|
||||||
.OrderByDescending(s => s.BegunAt)
|
.OrderByDescending(s => s.BegunAt)
|
||||||
.FirstOrDefaultAsync();
|
.FirstOrDefaultAsync();
|
||||||
|
if (subscription is { IsAvailable: false }) subscription = null;
|
||||||
|
|
||||||
// Cache the result if found (with 30 minutes expiry)
|
// Cache the result if found (with 30 minutes expiry)
|
||||||
if (subscription != null)
|
if (subscription != null)
|
||||||
|
Reference in New Issue
Block a user