Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ protected void ProcessRegularItems(Insurance insured, HashSet<MongoId> toDelete,
if (parentAttachmentsMap.ContainsKey(insuredItem.Id))
{
// This call will also return the parent item itself, queueing it for deletion as well.
var itemAndChildren = insured.Items.GetItemWithChildren(insuredItem.Id);
var itemAndChildren = insured.Items.GetItemWithChildren(insuredItem.Id, true);
foreach (var item in itemAndChildren)
{
toDelete.Add(item.Id);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ public List<K> DrawAndRemove(int itemCountToDraw = 1, List<K>? neverRemoveWhitel
drawnKeys.Add(chosenItem.Key);

// Only remove item if it's not in whitelist
if (neverRemoveWhitelist is not null && !neverRemoveWhitelist.Contains(chosenItem.Key))
if (neverRemoveWhitelist is null || !neverRemoveWhitelist.Contains(chosenItem.Key))
{
// Reduce total weight value by items weight + Remove item from pool
totalWeight -= chosenItem.Weight;
Expand Down