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