diff --git a/client/src/components/Allocations/AllocationsModals/AllocationsTeamViewModal/AllocationsTeamViewModal.jsx b/client/src/components/Allocations/AllocationsModals/AllocationsTeamViewModal/AllocationsTeamViewModal.jsx index 08132979f..413147cb2 100644 --- a/client/src/components/Allocations/AllocationsModals/AllocationsTeamViewModal/AllocationsTeamViewModal.jsx +++ b/client/src/components/Allocations/AllocationsModals/AllocationsTeamViewModal/AllocationsTeamViewModal.jsx @@ -83,6 +83,15 @@ const AllocationsTeamViewModal = ({ isOpen, toggle }) => { const handleTabChange = (e, newValue) => { setSelectedTab(newValue); }; + + let selectedUser = null; + if (removingUserOperation && removingUserOperation.username) { + selectedUser = removingUserOperation.username; + } + if (card && card.username === selectedUser) { + setCard(null); + } + return ( 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: