From 4e5ee5e88d18e3ae3ef292d92c81084236527936 Mon Sep 17 00:00:00 2001 From: Sainan <63328889+Sainan@users.noreply.github.com> Date: Mon, 30 Jun 2025 20:18:00 +0200 Subject: [PATCH] don't need to do this if the user never had a CalendarProgress to begin with, probably --- src/controllers/api/inventoryController.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/controllers/api/inventoryController.ts b/src/controllers/api/inventoryController.ts index 213102b3..cb855f16 100644 --- a/src/controllers/api/inventoryController.ts +++ b/src/controllers/api/inventoryController.ts @@ -109,7 +109,9 @@ export const inventoryController: RequestHandler = async (request, response) => } } - getCalendarProgress(inventory); // handle year rollover; the client expects to receive an inventory with an up-to-date CalendarProgress + if (inventory.CalendarProgress) { + getCalendarProgress(inventory); // handle year rollover; the client expects to receive an inventory with an up-to-date CalendarProgress + } cleanupInventory(inventory);