diff --git a/client/scripts/eslint-baseline.json b/client/scripts/eslint-baseline.json index 0fee320d2..3e2439144 100644 --- a/client/scripts/eslint-baseline.json +++ b/client/scripts/eslint-baseline.json @@ -35,7 +35,7 @@ }, "tests": { "@typescript-eslint/no-explicit-any": 489, - "@typescript-eslint/no-non-null-assertion": 1877, + "@typescript-eslint/no-non-null-assertion": 1876, "@typescript-eslint/no-misused-promises": 22, "@typescript-eslint/no-unused-vars": 51, "@typescript-eslint/no-floating-promises": 33, diff --git a/client/scripts/rtl-baseline.json b/client/scripts/rtl-baseline.json index 62ecdaf5e..3cf884e2f 100644 --- a/client/scripts/rtl-baseline.json +++ b/client/scripts/rtl-baseline.json @@ -39,7 +39,6 @@ "components/PDF/tripMapImage.ts": 1, "components/Packing/PackingListPanelBagCard.tsx": 1, "components/Packing/PackingListPanelCategoryGroup.tsx": 3, - "components/Packing/PackingListPanelItemRow.tsx": 2, "components/Planner/DayDetailPanel.tsx": 1, "components/Planner/PlaceInspector.tsx": 1, "components/Planner/TransitSearchPanel.tsx": 3, diff --git a/server/src/nest/packing/packing.service.ts b/server/src/nest/packing/packing.service.ts index 16cc4b57d..4791fe04a 100644 --- a/server/src/nest/packing/packing.service.ts +++ b/server/src/nest/packing/packing.service.ts @@ -422,8 +422,10 @@ export class PackingService { if (!item) return null; // On a Common item the owner is its first bringer, so taking them off the // item has to clear the owner too; otherwise their avatar stuck for good (#3098). - if (item.is_private === 0 && item.owner_id === userId) await this.itemsRepo.clearOwner(id); - await this.contributorsRepo.deleteOne(id, userId); + await this.uow.transactional(async () => { + if (item.is_private === 0 && item.owner_id === userId) await this.itemsRepo.clearOwner(id); + await this.contributorsRepo.deleteOne(id, userId); + }); return (await this.enrichItems([await this.itemsRepo.findById(id)]))[0]; }