Skip to content

Commit

Permalink
exclude 'dbotscore' from deletions
Browse files Browse the repository at this point in the history
  • Loading branch information
barryyosi-panw committed Oct 4, 2024
1 parent ee07922 commit 907b898
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Packs/CommonScripts/Scripts/DeleteContext/DeleteContext.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ function deleteKeys(keysToDelete = [], _keysToKeep = []) {
var errors = []
var message = '';
for (var key of keysToDelete) {
// 'DBotScore' key shall not be deleted in order to prevent caching it repeatedly and impacting performance.
if (key === "DBotScore"){
continue
}
const originalKey = typeof key === "string" ? key.trim() : key;
const keyToDelete = isSubPlaybookKey ? 'subplaybook-${currentPlaybookID}.' + originalKey: originalKey;
const result = executeCommand('delContext', { key: keyToDelete });
Expand Down

0 comments on commit 907b898

Please sign in to comment.