Skip Processing Deleted Insurance Attachments

This check simply skips over rolling for insurance for attachment items that have already been deleted due to their main-parent item being previously rolled for deletion.
This commit is contained in:
Refringe 2024-03-28 00:29:46 -04:00
parent 8a20da7e08
commit 41ef66298e
No known key found for this signature in database
GPG Key ID: 7715B85B4A6306ED

View File

@ -413,6 +413,13 @@ export class InsuranceController
{ {
for (const [parentId, attachmentItems] of mainParentToAttachmentsMap) for (const [parentId, attachmentItems] of mainParentToAttachmentsMap)
{ {
// Skip processing if parentId is already marked for deletion, as all attachments for that parent will
// already be marked for deletion as well.
if (toDelete.has(parentId))
{
continue;
}
// Log the parent item's name. // Log the parent item's name.
const parentItem = itemsMap.get(parentId); const parentItem = itemsMap.get(parentId);
const parentName = this.itemHelper.getItemName(parentItem._tpl); const parentName = this.itemHelper.getItemName(parentItem._tpl);