From 67f254a7f64d3f7277ac41ac4901939062937fa7 Mon Sep 17 00:00:00 2001 From: Liana Harris <46411498+LianaHarris360@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:20:34 -0500 Subject: [PATCH 1/2] Add getUserId func to SavedSearch Resource --- .../contentcuration/frontend/shared/data/resources.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contentcuration/contentcuration/frontend/shared/data/resources.js b/contentcuration/contentcuration/frontend/shared/data/resources.js index e23399479f..45ba9e5bcd 100644 --- a/contentcuration/contentcuration/frontend/shared/data/resources.js +++ b/contentcuration/contentcuration/frontend/shared/data/resources.js @@ -1749,6 +1749,10 @@ export const Invitation = new Resource({ export const SavedSearch = new Resource({ tableName: TABLE_NAMES.SAVEDSEARCH, urlName: 'savedsearch', + + getUserId(obj) { + return obj.saved_by; + }, }); export const User = new Resource({ From c7e41d7c97db7fce379310a17bd2b7d580c1a20f Mon Sep 17 00:00:00 2001 From: Liana Harris <46411498+LianaHarris360@users.noreply.github.com> Date: Mon, 22 Jul 2024 14:22:05 -0500 Subject: [PATCH 2/2] Add check for null values for filters to SavedSearchesModal --- .../channelEdit/views/ImportFromChannels/SavedSearchesModal.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue index f4a3d546b1..c19f454320 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/SavedSearchesModal.vue @@ -167,7 +167,7 @@ }, searchFilterCount(savedSearch) { return Object.entries(savedSearch.params).reduce((sum, [key, val]) => { - if (key === 'keywords') { + if (key === 'keywords' || val === null) { return sum; } else if (typeof val === 'boolean') { return sum + 1;