Skip to content

Commit

Permalink
project search:Handle scenario where id is missing (#899)
Browse files Browse the repository at this point in the history
  • Loading branch information
chandra-tacc committed Dec 8, 2023
1 parent 4d006aa commit a87895a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/portal/apps/projects/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit a87895a

Please sign in to comment.