[v11.0.x] Snapshots: Fix panic when snapshot_remove_expired is true (#91330)

Snapshots: Fix panic when snapshot_remove_expired is true (#91232)

(cherry picked from commit bb5d2c83ef)

Co-authored-by: Ryan McKinley <ryantxu@gmail.com>
This commit is contained in:
grafana-delivery-bot[bot]
2024-07-31 16:41:53 +03:00
committed by GitHub
co-authored by Ryan McKinley
parent 15a3afdc35
commit cb75e88483
@@ -34,7 +34,7 @@ func NewStore(db db.DB, skipDeleteExpired bool) *DashboardSnapshotStore {
if skipDeleteExpired {
log.Warn("[Deprecated] The snapshot_remove_expired setting is outdated. Please remove from your config.")
}
return &DashboardSnapshotStore{store: db, skipDeleteExpired: skipDeleteExpired}
return &DashboardSnapshotStore{store: db, skipDeleteExpired: skipDeleteExpired, log: log}
}
// DeleteExpiredSnapshots removes snapshots with old expiry dates.