From 141e3d2de02daa69d67a757d5fe1cad50eb7a564 Mon Sep 17 00:00:00 2001 From: Tiago Santana <54704492+SantanaTiago@users.noreply.github.com> Date: Fri, 28 Jul 2023 12:47:49 +0100 Subject: [PATCH] fix: refrain from instantiating DataIndex from saved searches (#120) Signed-off-by: Tiago Santana <54704492+SantanaTiago@users.noreply.github.com> --- deepsearch/cps/client/components/data_indices.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/deepsearch/cps/client/components/data_indices.py b/deepsearch/cps/client/components/data_indices.py index a5f04bd1..9a9a2e0c 100644 --- a/deepsearch/cps/client/components/data_indices.py +++ b/deepsearch/cps/client/components/data_indices.py @@ -30,7 +30,12 @@ def list(self, proj_key: str) -> List[DataIndex]: sw_client.ProjectDataIndexWithStatus ] = self.sw_api.get_project_data_indices(proj_key=proj_key) - return [DataIndex.parse_obj(item.to_dict()) for item in response] + # filter out saved searchs index + return [ + DataIndex.parse_obj(item.to_dict()) + for item in response + if item.to_dict()["type"] != "View" + ] def create( self,