From d4fdeb805142a3514ccfa43d0ccbde50c7b71f98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Maxi=20Quo=C3=9F?= Date: Sat, 28 Jan 2023 11:01:02 +0100 Subject: [PATCH] fix update device --- 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 237fece5..6f550a73 100644 --- a/frontend/src/components/DeviceForm.svelte +++ b/frontend/src/components/DeviceForm.svelte @@ -56,7 +56,7 @@ if (mode === 'add') { await pb.collection('devices').create(device); } else { - await pb.collection('devices').update(device.id); + await pb.collection('devices').update(device.id, device); } // show button with timeout @@ -178,7 +178,7 @@
Optional:
{#if device?.expand?.ports} - {#each device?.expand?.ports as port, idx} + {#each device.expand.ports as port, idx}
Port