From 8c8671908c3170b0bcd56ede882b73196c2a90d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Mon, 30 Jan 2023 13:13:09 +0100 Subject: [PATCH] fix save new ports --- frontend/src/components/DeviceForm.svelte | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/DeviceForm.svelte b/frontend/src/components/DeviceForm.svelte index 02bd50d4..4507527e 100644 --- a/frontend/src/components/DeviceForm.svelte +++ b/frontend/src/components/DeviceForm.svelte @@ -41,9 +41,9 @@ if (!port.id) { const result = await $pocketbase.collection('ports').create(port); device.ports = [...device.ports, result.id]; - return; + } else { + await $pocketbase.collection('ports').update(port.id, port); } - await $pocketbase.collection('ports').update(port.id, port); } // create or update device