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

This commit is contained in:
Ryan McKinley
2024-07-31 16:21:58 +03:00
committed by GitHub
parent b7d434faaf
commit bb5d2c83ef
@@ -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.