From a791e56d713d213c9875dc3550b39a1e7c545a87 Mon Sep 17 00:00:00 2001 From: Chandra Y Date: Thu, 9 Nov 2023 17:28:31 -0600 Subject: [PATCH] project search:Handle scenario where id is missing --- server/portal/apps/projects/views.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/portal/apps/projects/views.py b/server/portal/apps/projects/views.py index fe25e2bc5..94addcc15 100644 --- a/server/portal/apps/projects/views.py +++ b/server/portal/apps/projects/views.py @@ -86,7 +86,7 @@ def get(self, request): search = search.extra(from_=int(offset), size=int(limit)) res = search.execute() - hits = list(map(lambda hit: hit.id, res)) + hits = [hit.id for hit in res if hasattr(hit, 'id') and hit.id is not None] listing = [] # Filter search results to projects specific to user if hits: