🐛 Another fix to prevent the subscription get wrong data

This commit is contained in:
2025-08-09 21:50:42 +08:00
parent 4bceb119ea
commit 91de6797c5

View File

@@ -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)