From 5a7c3927f39fc6b677fd5a76452e1b658d5cf84f Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 13 Sep 2024 19:14:54 +0200 Subject: [PATCH] fix(view): correctly resolve label for filtered views or buckets --- frontend/src/components/project/views/ViewEditForm.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/frontend/src/components/project/views/ViewEditForm.vue b/frontend/src/components/project/views/ViewEditForm.vue index d4edc3db9..c457d5244 100644 --- a/frontend/src/components/project/views/ViewEditForm.vue +++ b/frontend/src/components/project/views/ViewEditForm.vue @@ -30,7 +30,7 @@ const projectStore = useProjectStore() onBeforeMount(() => { const transform = (filterString: string) => transformFilterStringFromApi( filterString, - labelId => labelStore.getLabelById(labelId)?.title, + labelId => labelStore.getLabelById(labelId)?.title || null, projectId => projectStore.projects[projectId]?.title || null, ) @@ -51,7 +51,7 @@ onBeforeMount(() => { function save() { const transformFilter = (filterQuery: string) => transformFilterStringForApi( filterQuery, - labelTitle => labelStore.filterLabelsByQuery([], labelTitle)[0]?.id || null, + labelTitle => labelStore.getLabelByExactTitle(labelTitle)?.id || null, projectTitle => { const found = projectStore.findProjectByExactname(projectTitle) return found?.id || null