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);