From d899311eea0b7d290d597f6a2980874adaa8f389 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?No=C3=A9=20Viricel?= Date: Wed, 21 Aug 2024 15:15:08 +0200 Subject: [PATCH] fix: empty payload on bulk validation #229 --- pages/[project]/changes_logs.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/pages/[project]/changes_logs.vue b/pages/[project]/changes_logs.vue index fcddecd..461d881 100644 --- a/pages/[project]/changes_logs.vue +++ b/pages/[project]/changes_logs.vue @@ -116,6 +116,10 @@ function removeLogs(loChaIds?: number[]) { async function handleAccept(loChaIds?: number[]) { try { + if (!loChaIds) { + loChaIds = loChasWithFilter.value.map((loCha) => loCha.id) + } + await $fetch( `${useRuntimeConfig().public.API}/projects/${projectSlug}/changes_logs/accept`, { @@ -130,7 +134,7 @@ async function handleAccept(loChaIds?: number[]) { ) removeLogs(loChaIds) - if (!loChaIds || !loChasWithFilter.value.length) { + if (!loChasWithFilter.value.length) { resetFilters() } } @@ -165,7 +169,7 @@ function matchFilterBySelectors(selectors: string[]) {

{{ $t('logs.data') }}