mirror of
https://github.com/truewhile/MeBox.git
synced 2026-10-03 04:26:36 +08:00
fix active subscription visibility after updates
This commit is contained in:
@@ -21,7 +21,11 @@ func (r *SubscriptionRepository) Create(ctx context.Context, s *model.Subscripti
|
||||
// intentionally excluded from scheduler polling and the active management list.
|
||||
func (r *SubscriptionRepository) List(ctx context.Context) ([]model.Subscription, error) {
|
||||
var rows []model.Subscription
|
||||
err := r.db.WithContext(ctx).Where("archived_at IS NULL").Order("created_at desc").Find(&rows).Error
|
||||
err := r.db.WithContext(ctx).Unscoped().
|
||||
Where("archived_at IS NULL").
|
||||
Where("deleted_at IS NULL OR enabled = ?", true).
|
||||
Order("created_at desc").
|
||||
Find(&rows).Error
|
||||
return rows, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user