From c0d5242763e0607c4f9d4fd7b243a87c88eb2016 Mon Sep 17 00:00:00 2001 From: cupcakearmy Date: Sun, 20 Sep 2020 17:43:55 +0200 Subject: [PATCH] fiex update function --- src/dashboard/components/RulesEditor.svelte | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/dashboard/components/RulesEditor.svelte b/src/dashboard/components/RulesEditor.svelte index 0f2aa3a..e3f471d 100644 --- a/src/dashboard/components/RulesEditor.svelte +++ b/src/dashboard/components/RulesEditor.svelte @@ -23,7 +23,8 @@ } async function save() { - await Limits.update({ host: limit.host }, limit, { upsert: true }) + const { _id, ...rest } = limit + await Limits.update({ _id }, rest, { upsert: true }) dispatch('update') close() }