diff --git a/web/src/routes/modules/[moduleId]/+page.svelte b/web/src/routes/modules/[moduleId]/+page.svelte index c866b7e..e71dc6d 100644 --- a/web/src/routes/modules/[moduleId]/+page.svelte +++ b/web/src/routes/modules/[moduleId]/+page.svelte @@ -146,8 +146,6 @@ // Module edit let editDialog = $state(false); let editForm = $state({}); - let editDefaultCommunitySelect = $state('__none__'); - let editDohProfileSelect = $state('__none__'); let editSaving = $state(false); let deleteModDialog = $state(false); let deletingMod = $state(false); @@ -267,8 +265,6 @@ default_community_id: mod.default_community_id, doh_profile_id: mod.doh_profile_id }; - editDefaultCommunitySelect = nullableSelectValue(mod.default_community_id); - editDohProfileSelect = nullableSelectValue(mod.doh_profile_id); editDialog = true; } @@ -285,8 +281,8 @@ ...editForm, cron_expr: cron ? cron : null, refresh_interval_sec: Number.isFinite(interval) ? interval : null, - default_community_id: fromNullableSelect(editDefaultCommunitySelect), - doh_profile_id: fromNullableSelect(editDohProfileSelect) + default_community_id: fromNullableSelect(nullableSelectValue(editForm.default_community_id)), + doh_profile_id: fromNullableSelect(nullableSelectValue(editForm.doh_profile_id)) }; await apiMutate(`/v1/modules/${moduleId}`, 'PATCH', payload); await loadMod(); @@ -1314,9 +1310,8 @@ { - editDohProfileSelect = nullableSelectValue(v); editForm.doh_profile_id = fromNullableSelect(v); }} > @@ -1369,7 +1362,6 @@ size="sm" class="h-7 px-2" onclick={() => { - editDohProfileSelect = NONE_OPTION; editForm.doh_profile_id = null; }} >