From 81f885311d180e03bcdaae95e17bdc0f3c1f07f0 Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 21 Feb 2023 13:24:23 +0100 Subject: [PATCH] debug --- apps/api/src/lib/services/handlers.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/api/src/lib/services/handlers.ts b/apps/api/src/lib/services/handlers.ts index f159afdc0..c33501535 100644 --- a/apps/api/src/lib/services/handlers.ts +++ b/apps/api/src/lib/services/handlers.ts @@ -75,12 +75,15 @@ export async function startService(request: FastifyRequest, fa } const customVolumes = await prisma.servicePersistentStorage.findMany({ where: { serviceId: id } }) let volumes = new Set() - console.log(template.services[s], arm) + console.log(template.services[s].volumes) if (arm && template.services[s]?.volumesArm?.length > 0) { template.services[s].volumesArm.forEach(v => volumes.add(v)) } else { - template.services[s].volumes.forEach(v => volumes.add(v)) + if (template.services[s]?.volumes?.length > 0) { + template.services[s].volumes.forEach(v => volumes.add(v)) + } } + // Workaround: old plausible analytics service wrong volume id name if (service.type === 'plausibleanalytics' && service.plausibleAnalytics?.id) { console.log('old plausible analytics service')