Skip to content

Commit

Permalink
fix: refrain from instantiating DataIndex from saved searches (#120)
Browse files Browse the repository at this point in the history
Signed-off-by: Tiago Santana <54704492+SantanaTiago@users.noreply.github.com>
  • Loading branch information
SantanaTiago committed Jul 28, 2023
1 parent 09b9d73 commit 141e3d2
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion deepsearch/cps/client/components/data_indices.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit 141e3d2

Please sign in to comment.