Skip to content

Commit

Permalink
fix: exclude deleted entitlements from autoreset (#1285)
Browse files Browse the repository at this point in the history
  • Loading branch information
GAlexIHU authored Aug 1, 2024
1 parent 0ebba16 commit 41cbe74
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions internal/entitlement/postgresadapter/entitlement.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,6 +356,7 @@ func (a *entitlementDBAdapter) ListEntitlementsWithExpiredUsagePeriod(ctx contex
db_entitlement.Namespace(namespace),
db_entitlement.CurrentUsagePeriodEndNotNil(),
db_entitlement.CurrentUsagePeriodEndLTE(expiredBefore),
db_entitlement.Or(db_entitlement.DeletedAtIsNil(), db_entitlement.DeletedAtGT(clock.Now())),
).
All(ctx)
if err != nil {
Expand Down

0 comments on commit 41cbe74

Please sign in to comment.